DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP.NET (http://www.daniweb.com/forums/forum18.html)
-   -   SQL format exception (http://www.daniweb.com/forums/thread153000.html)

Robins Antony Oct 23rd, 2008 4:32 am
SQL format exception
 
hi all pls help

Input string is not in a correct format.

string selectsql = ("select title,convert(varchar,date,106)as date,description,cast(status as bit)as status from event_tbl where i_eid=" + Convert.ToInt32(id2) + "");

Regards

dickersonka Oct 27th, 2008 6:45 pm
Re: SQL format exception
 
Of course we can see what the error is, here is something to help you rather than just tell you.

After assigning your sql statement, do this.

System.Diagnostics.Debug.WriteLine(selectsql);

Then you will be able to tell where the error is at.


All times are GMT -4. The time now is 4:17 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC