best way to debug

  • Thread starter Thread starter Scott Emick
  • Start date Start date
S

Scott Emick

When I try to execute
dc.daOrders.Update(ds.Orders)
I get:
Run-time exception thrown : System.FormatException - Input string was not in
a correct format.
I think in my typed dataset/datatable one of the column's defaults must be
null or something and since the column type is string it is throwing that
error....But what makes no sense is if I iterate through all all the column
values prior to the update I can read each one with no error...The debugger
is really lame on this one I cannot see what column is throwing the error,
or if it is a parameter in the updatecommand, or where the problem is...Any
ideas to help me debug this?

Thanks,
Scott
 
After tearing apart the sqlDataAdapter's parameter objects, command objects
I deleted and recreated thedataadapter. That didn't help. Then I moved to
the xsd dataset, took all the xml for the column elements and pasted into
excel sorting the whole mess by datatype to make sure all the null value
settings a defaults were in order. I had manually added defaults of "" for
string types but then later set null value to be "" for string types.
Apparently adding the defaults is overkill. Removing those defaults got rid
of my errors!

Scott
 

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

Back
Top