|
|
sybperl-l Archive
Up Prev Next
From: "Mark Aufflick" <mark at aufflick dot com>
Subject: Re: Retrieving Identity Value of newly inserted row
Date: Jan 31 2006 11:47PM
Couldn't DBD::Sybase internally cache the value of @@identity at the end
of each sql call that has an insert, which could then be returned later
if the method was called?
On 1/1/1970, "Michael Peppler" wrote:
> will always return an identity value of 0, which is obviously incor-
> rect. This behaviour is due to the fact that the handling of ?-style
> placeholders is implemented using temporary stored procedures in
> Sybase, and the value of @@identity is reset when the stored procedure
> has executed. Using an explicit stored procedure to do the insert and
> trying to retrieve @@identity after it has executed results in the same
> behaviour.
|