-
Help with Triggers
Hi folks,
Can anybobdy help me. I`ve recently started using SQL Server 6.5 and I`m having a problem with triggers. I`ve written one for an insert to tableA and when it fires it uses some values from the record being inserted to update a field in tableB. Straight forward enough. The only thing is I don`t want the insert to happen if I can`t update tableB so to test this I put a lock on tableB and ran the insert, nothing seemed to happen and I`m at a loss to figure out what happened. I`m using @@error to determine if an error has occured (I figured that trying to do an update on a locked table would return an error) and if it has to rollback the transaction.
Any help is much appreciated!
Rob
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|