error handling when updating a datasource via a data adapter

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

i'm updating a table using a data adapter and stored procedure as it's
insert/update commands.

in certain cases, i would like the stored procedure to throw an exception
and fail -- or just return an error, and then i want to catch the exception
at the .net application layer.

how is the best way to handle this? i don't mind if the entire update
fails, rather than just one of the updated rows in the dataset. i would just
like to handle it simply. i wasn't successful with the docs on this one.

much appreciated,
matthew
 
Hi,

trap the DataAdapters RowUpdated event, theres a Error property which is a
exception object that you can look for the type of error.

HTH
Regards
Joyjit
 
Back
Top