Subject Re: [firebird-support] Looking for answer on ADO/ODBC Auto_Increment Return Value
Author Uwe Grauer
Chris Thornberry wrote:

> Greetings list,
>
> I am currently having a problem with an application I am working on. I
> need
> to return the primary key value (generated by a
> trigger/generator/procedure
> combination) of the newly inserted record.
>
> I am using ASP (with VBScript) and ADO/ODBC to connect to my firebird
> database. After countless hours of searching online I found a command
> "SELECT @@IDENTITY" for MSSQL to retrieve the value, but wonder if
> there is
> a similar command for Firebird or another work around.
>
> Thanks much in advance.
>
> Regards,
> Chris
>
Chris,
iff you have to know the newly created PK, you have to get a new PK in
your Client App
before posting the record, fill this new PK into your PK Field and Post
the new Record.
There is no way to get the PK after it was filled in by a trigger.

Uwe