Link to home
Start Free TrialLog in
Avatar of mmtcunningham1
mmtcunningham1

asked on

How do I check for errors after doing an insert on a database file?

I have created a program that allows the user to enter data on a form and when they click the submit button, it will call my subroutine to add the data to a database.  I have a sqldatasource called ds1 & the insert command calls a stored procedure.  The button click calls ds1.insert and I want to do some error checking to make sure the insert was successful.  If it was successful, then I want to send a message to let the user know that it's been successful.  I'm assuming that I can use the try...catch method but really don't know how to use this properly.  Any help is appreciated!!!
ASKER CERTIFIED SOLUTION
Avatar of jmwheeler
jmwheeler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial