My goal is to be able to insert two rows into two different tables. One is a detail table and the other is like a status history table (new, opened, assigned, etc.)
I would like to insert the new record into the detail table, and then, if that insert was sucessful, insert another record into the status history indicating that the record is new.
I can do this in ASP without any error checking, etc, but I would like to have some error checking that stops the transaction if the first fails, rolls back if the second fails, and redirects based on the results. My question is should I be exploring what transactions can do for me or looking into making a stored procedure? I don't see how to check the status of a sql statement with transactions. I haven't done anything with SQL server stored procedures either. So, if that is what I need to do, any links to examples/docu for getting started would be greatly appreciated.
Thanks!
Gordon
I would like to insert the new record into the detail table, and then, if that insert was sucessful, insert another record into the status history indicating that the record is new.
I can do this in ASP without any error checking, etc, but I would like to have some error checking that stops the transaction if the first fails, rolls back if the second fails, and redirects based on the results. My question is should I be exploring what transactions can do for me or looking into making a stored procedure? I don't see how to check the status of a sql statement with transactions. I haven't done anything with SQL server stored procedures either. So, if that is what I need to do, any links to examples/docu for getting started would be greatly appreciated.
Thanks!
Gordon