[Lazarus] Reading result of a Firebird stored-procedure
Graeme Geldenhuys
graemeg.lists at gmail.com
Mon Mar 7 20:53:44 CET 2011
On 7 March 2011 18:33, <michael.vancanneyt@*****wrote:
> But for getting the next value of a generator you don't need a stored
> procedure.
> Just do a
>
> SELECT gen_id(StaffelNr_GEN, 1) AS THEID FROM RDB$DATABASE;
As an alternative:
Or even easier, generate a GUID in your application, and simply assign
it as the primary key to whatever record. ;-) One less query to the
database, you know the primary key before the data is saved (great for
master-detail records), and it is guaranteed to be unique, even across
tables and across databases.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
More information about the Lazarus
mailing list