Skip to Content.
Sympa Menu

freetds - Re: Equivalent of mysql_insertid using FreeTDS/DBD::Sybase?

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Michael Peppler <mpeppler AT peppler.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: Equivalent of mysql_insertid using FreeTDS/DBD::Sybase?
  • Date: 30 Sep 2002 15:27:20 -0700

On Mon, 2002-09-30 at 15:19, Richard Wolfe wrote:
>
> ...where $newid returns the value of the auto-incrementing field. Is there
> an equivalent function in DBD::Sybase? The pod file says something about
> @@IDENTITY, but I can't get this to work. Am I on the right track?

Just add a "select @@identity" to your insert request, or execute the
"select @@identity" on the same connection right after the insert is
done.

Michael
--
Michael Peppler / mpeppler AT peppler.org / http://www.mbay.net/~mpeppler
mpeppler AT zetatools.com / ZetaTools, Inc / http://www.zetatools.com
ZetaTools: Call perl functions as Sybase stored procedures!

Attachment: signature.asc
Description: This is a digitally signed message part




Archive powered by MHonArc 2.6.24.

Top of Page