ibatis-user-cs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alon Hirsch" <alon.hir...@ebam.co.za>
Subject SELECT @@IDENTITY vs SELECT SCOPE_IDENTITY
Date Tue, 20 May 2008 07:07:10 GMT
Hi,

It seems that there is an issue using SELECT SCOPE_IDENTITY() in order
to get the ID of an inserted record using SQL Server 2005.
When using SCOPE_IDENTITY - the returned value is 0 instead of the
actual value returned from the SQL, but when using @@IDENTITY, the key
is returned.

Is this a bug or by design ?
Is there any change that the system can be made to work with
SCOPE_IDENTITY as well ?

Thanx,
Alon

Mime
View raw message