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

  • Thread starter Thread starter Daniel
  • Start date Start date
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
 
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
 
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
 
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
 
Back
Top