RE: serial field with delphi
Posted in 1999
Topics: Stored Procedures & SPL
JM:
to get the value of a serial column I created this simple stored procedure:
Create Procedure GetSerial() returning integer; Return DBINFO('sqlca.sqlerrd1');
end procedure;
which I execute after the insert statement. No other sql statement should be
executed between
the insert and the stored procedure.
-Diego Mezzera
-----Mensaje original-----
De: jm <jmtheven@club-internet.fr>
Para: informix-list@iiug.org <informix-list@iiug.org>
Fecha: Jueves, 23 de Septiembre de 1999 02:15 p.m.
Asunto: serial field with delphi
> anyone know how to get the new serial field created by informix in a
>"insert
> " request ?
>
> ex : query.sql :
> insert into table (code,libelle) values (:code,:libelle)> code is serial(4) and libelle is string
>
> program :
> Query.ParamByName('libelle').AsString := 'toto';
> Query.ExecSql;
>
> I want to know what is the value of "code" in the row generated.
>
> For the moment, i use "append" in a "select" request and i can get the
> serial after the "post",
> but if it is possible to use "insert", it will be better
>
> Thanks for your time.
>
> JM
>
>
>