Subject | RE: [firebird-support] Get duplicate generator value? Am I doing wrong? |
---|---|
Author | Kevin Stanton |
Post date | 2005-04-04T14:23:04Z |
As always - Thanks Helen!
Kevin
_____
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, April 01, 2005 2:35 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Get duplicate generator value? Am I doing
wrong?
At 07:47 AM 1/04/2005 -0800, Kevin Stanton wrote:
though. This routine could certainly return duplicates - it would only
take the increment expression evaluating to '0' to cause that.
[Non-text portions of this message have been removed]
Kevin
_____
From: Helen Borrie [mailto:helebor@...]
Sent: Friday, April 01, 2005 2:35 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Get duplicate generator value? Am I doing
wrong?
At 07:47 AM 1/04/2005 -0800, Kevin Stanton wrote:
>Hi Helen,IntToStr(OrderCnt)
>
>I thought there was also a transaction issue as well. I was getting
>duplicates as well at one point using a TIB_Cursor and you recommended the
>following:
>
>qryGetOrderNos is TIB_DSQL
>
> with qryGetOrderNos do
> begin
> try
> trNextID.StartTransaction;
>
> SQL.Strings[0] := 'select gen_id ( gen_orderno, ' +
>+ ' ) as EOrderNo from rdb$database';This doesn't look like my code! maybe a mod of someone else's,
> If NOT Prepared then Prepare;
> Execute;
> eo := FieldByName('EOrderNo').AsInteger;
> trNextID.Commit;
> except
> trNextID.Rollback;
> raise;
> end;
> end;
though. This routine could certainly return duplicates - it would only
take the increment expression evaluating to '0' to cause that.
[Non-text portions of this message have been removed]