How do I check for errors after doing an insert on a database file?
Posted on 2009-02-19
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!!!