SQL format exception

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Aug 2007
Posts: 21
Reputation: Robins Antony is an unknown quantity at this point 
Solved Threads: 0
Robins Antony Robins Antony is offline Offline
Newbie Poster

SQL format exception

 
0
  #1
Oct 23rd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 1,160
Reputation: dickersonka will become famous soon enough dickersonka will become famous soon enough 
Solved Threads: 137
dickersonka dickersonka is offline Offline
Veteran Poster

Re: SQL format exception

 
0
  #2
Oct 27th, 2008
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.
Custom Application & Software Development
www.houseshark.net
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC