Subject | RE: [IBO] How to get the record id that was just stored with a query |
---|---|
Author | Alan McDonald |
Post date | 2005-06-30T06:39:57Z |
> >It sure is!!!
> > a 3rd way is to ask for the ID in the AfterInsert event with
> > IB_Dataset.FieldByName('ID').AsInt64 :=
> IB_Dataset.Gen_ID('GEN_name',1);
> >
> > Alan
> >
>
> This wouldn't necessarily be the value used for the insert when there
> are others inserting data into the same table at the same time.
>
> Florian
Once you have obtained the next gen value - noone else can get it.
Alan
PS - my original post had increment 10 because I use 10 to increment for
replication here - but inc 1 is the norm.