Subject | RE: Generator |
---|---|
Author | Mick Arundell |
Post date | 2004-02-21T07:33:15Z |
Eduado,
Read the Generated number from the database before you post
Generally somthing like
select gen_id (generator,0) from rdb$database and this will return the next
number in generator
When you insert your record
set rowid from previous select
in your before insert you will need to have
if (RowId is null) then
RowId = Gen_Id(GeneratorName, 1);
Read the Generated number from the database before you post
Generally somthing like
select gen_id (generator,0) from rdb$database and this will return the next
number in generator
When you insert your record
set rowid from previous select
in your before insert you will need to have
if (RowId is null) then
RowId = Gen_Id(GeneratorName, 1);
>Hi!execute the command
>
>A have a generator as a primary key but after I
>ApplyUpdates I need to recover the number to show foruser. I'm use
>dbEdit´s, SQLConnection, SQLDataSet, Provider,ClientDataSet and
>FireBird 1.5.
>
>I' need help.
>
>Thank you.
>
>Eduardo
>Brasil