sqlexception was unhandled?

Posted by Sudheep.grandhe under C# on 11/11/2011 | Points: 10 | Views : 1050 | Status : [Member] | Replies : 2
Hi,

the following error was shown in my coding.please do the needful.
Error:-
Arithmetic overflow error converting expression to data type datetime.
The statement has been terminated.
Here is my coding.please find it.

cmd.ExecuteNonQuery ();// error pointout to the below line.
SqlCommand cmd = new SqlCommand("insert into tbl_temp (invoiceno,particulars,quantity,perprice,amount,orderno,compname,invoicedate,ondate,invoiceid)values(@invoiceno,@particulars,@quantity,@perprice,@amount,@orderno,@compname,@invoicedate,@ondate,@invoiceid)", con);

Best,
Sudheep.



Responses

Posted by: Naraayanan on: 1/6/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Check with your table Data type.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Hmanjarawala on: 1/6/2012 [Member] Bronze | Points: 25

Up
0
Down
Hi sudheep, will you paste the code in which you passed value in parameters....??

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

Sudheep.grandhe, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response