[fpc-pascal] How to insert a record and get the primary key with sqldb?
Martin Schreiber
mse00000 at gmail.com
Sat Oct 22 16:35:38 CEST 2011
On Saturday 22 October 2011 16.20:13 Michael Van Canneyt wrote:
> >
> > Note that I did not invest this stuff ... I just copied from stuff to
> > create other tables which were already in the project.
>
> You must get a value first, and pass it along to the insert statement.
>
> Auto-generation is not possible, since you don't have any link between
> the sequence and your table. (normally, this is done in the trigger).
>
BTW, MSEgui has tsequencelink which fetches a sequence value and stores it in
the field by posting a inserted record automatically. Works for Firebird and
Postgres.
Martin
More information about the fpc-pascal
mailing list