DataAdapter.Update() failure

  • Thread starter Thread starter Max Sandman
  • Start date Start date
M

Max Sandman

My update is failing on the insert. I've got the call inside a try/catch
but the message is too crytic and I can't find the actual sql that is
being called on my behalf. Where and how can I get into the code that
is actually doing the update? All I can do is guess at what is wrong and
it's extremely frustrating. There have to be some better debugging
tools for these DataAdapter/DataSet classes.

sandman
 
Max,

Can you post the exception details?

Also, you can see the insert statement by looking at the InsertCommand
property of the SqlDataAdapter instance you have. Once you have that, you
can check the CommandText property of the SqlCommand instance to get the
statement that is being executed.

Hope this helps.
 
Off the top of my head, your problem could be that you don't have a
CommandBuilder object or a Command object for your insert. A snippet of
code that is giving you problems would be very helpful.

- Carl
 
Back
Top