On Mon, Mar 10, 2003 at 07:41:19AM -0800, Michael Peppler wrote:
> On Sat, 2003-03-08 at 13:11, Tim Bunce wrote:
> > On Fri, Mar 07, 2003 at 04:28:33PM -0800, Michael Peppler wrote:
> > > On Fri, 2003-03-07 at 14:15, Tim Bunce wrote:
> > > > I'd appreciate a summary of which drivers support some form of
> > > > ``last insert id'' and details of the interface they provide.
> > > > 
> > > > Specifically...
> > > >         via an attribute or method?
> > > >         at the sth or dbh level, or both?
> > > >         any other details that might be relevant...
> > > > 
> > > > Also, for databases that do _not_ support a ``last insert id''
> > > > concept in the client API, are there any SQL mechanisms for finding
> > > > the last insert id?
> 
> > > 
> > > Note that you *can't* get at the @@identity value if you insert data
> > > using placeholders. This is because Sybase also localizes the
> > > @@variables within each stored procedure, and when using placeholders
> > > Sybase creates a temporary stored procedure for you on the fly.
> > > 
> 
> > Could the generated temporary stored procedure copy @@identity to
> > a non-localized session variable (where it could then be read by
> > DBD::Sybase if the application wants the last_insert_id)?
> 
> Unfortuantely no. YOu have no control over the content of the temp.
> stored proc beyond the actual insert statement.

Which 'you'? Doesn't DBD::Sybase created those temporary stored
procedures itself?

Tim.

Reply via email to