ADO.Net Error "Input string was not in a correct format"

D

Daniel

Hi,

I am trying to update a db using the dataadapter, three command objects
(insert,update...) and a dataset (MS SQL Server). I create my command
objects via stored procedures which works fine. However when I call
dataAdapter.Update(dataSet, tableName); it throws the "Input string was not
in a correct format" and I have no idea why. Can someone help me?

Thanks
 
W

William Ryan eMVP

I can't tell from here. Have you set your commandtype to CommandType
StoredProcedure? have you used "@" symbols for your params?

Could you post the code where you create the UpdateCommand (not the stored
proc although it would help, but the part where you add parameters. Also,
can you post the code right before this exception
 
D

Daniel

I figured it out, the problem was the table name (order details) had a space
between the two words. Once I change that, it worked.

Thanks
 
W

William Ryan eMVP

Good to hear ;-)
Daniel said:
I figured it out, the problem was the table name (order details) had a space
between the two words. Once I change that, it worked.

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top