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

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to