Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 transaction problem

Author  Topic 

alenak
Starting Member

2 Posts

Posted - 2008-01-24 : 04:17:49
Hi Everybody,

Problem has been solved

thanks for your replies .

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2008-01-24 : 04:28:29
IDENT_CURRENT returns the last identity for a given table regardless of scope. I think you want to use SCOPE_IDENTITY so that you return the identity value used within the scope of your current transaction.



-ec
Go to Top of Page

alenak
Starting Member

2 Posts

Posted - 2008-01-24 : 04:58:44
I used IDENT_CURRENT('AimB') because I must use of 'AimB' table identity because of relationship. Moreover, there are 2 points to consider;

1.If I use IDENT_CURRENT is there any possibilities of having another table id in the same transaction?

2.Why does sql server not make rollback when first insertion committed but other insertions fail in the same transaction?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-01-25 : 09:07:20
quote:
Originally posted by alenak

Hi Everybody,

Problem has been solved

thanks for your replies .



Please can you refrain from editing your original post. This loses visibility of your original question for anybody viewing this post. These posts not only provide solution to your problem but also serve as learning points for others. So please add your comments as a new reply.
Go to Top of Page
   

- Advertisement -