any sql server guru's on here?
#1
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes
on
0 Posts
got problems with @@IDENTITY and Insert triggers, anyone faced (and sorted) this problem, its a known problem in SQL7 but shouldnt be in 2K.
Thanks
Gary
Thanks
Gary
#2
What's the problem?
If it's getting the IDENTITY that occurred in the INSERT you performed, rather than the IDENTITY updated by any triggers that are around, try using SCOPE_IDENTITY() instead.
If it's getting the IDENTITY that occurred in the INSERT you performed, rather than the IDENTITY updated by any triggers that are around, try using SCOPE_IDENTITY() instead.
#3
Scooby Regular
Thread Starter
Join Date: Sep 1999
Location: Bedfordshire
Posts: 4,037
Likes: 0
Received 0 Likes
on
0 Posts
thanks dh, thats what I was using but it still wasn't working, I am using IDENT_CURRENT(<tablename> and that works a treat!
Thanks for your help.
Gary
Thanks for your help.
Gary
Thread
Thread Starter
Forum
Replies
Last Post
Puff The Magic Wagon!
Non Scooby Related
5
06 November 2000 08:09 PM