Subject | RE: [Firebird-general] Generator Question |
---|---|
Author | Kevin Stanton |
Post date | 2011-11-30T18:33:04Z |
Thanks Ann -
Great question about the InOrderCount being 0 or negative. It definitely
should not be but I'll take a look to see if this is even possible in my app
and put in a warning to the user if 0 or negative is encountered.
The Transaction component does get freed and released after the call.
Kevin
From: Firebird-general@yahoogroups.com
[mailto:Firebird-general@yahoogroups.com] On Behalf Of Ann Harrison
Sent: Wednesday, November 30, 2011 10:24 AM
To: Firebird-general@yahoogroups.com
Subject: Re: [Firebird-general] Generator Question
On Wed, Nov 30, 2011 at 1:04 PM, Kevin Stanton
<Kevin.Stanton@... <mailto:Kevin.Stanton%40rdb-solutions.com>
the transaction is read only, read committed. Otherwise, you'll block
garbage collection. But that will have no effect on generators.
And, this question probably should have gone to firebird-support
@yahoogroups.com
Cheers,
Ann
[Non-text portions of this message have been removed]
Great question about the InOrderCount being 0 or negative. It definitely
should not be but I'll take a look to see if this is even possible in my app
and put in a warning to the user if 0 or negative is encountered.
The Transaction component does get freed and released after the call.
Kevin
From: Firebird-general@yahoogroups.com
[mailto:Firebird-general@yahoogroups.com] On Behalf Of Ann Harrison
Sent: Wednesday, November 30, 2011 10:24 AM
To: Firebird-general@yahoogroups.com
Subject: Re: [Firebird-general] Generator Question
On Wed, Nov 30, 2011 at 1:04 PM, Kevin Stanton
<Kevin.Stanton@... <mailto:Kevin.Stanton%40rdb-solutions.com>
> wrote:False)
>
> I have a customer that reports from time to time that my application is
> issuing the same Order Number. The order number's source is a generator.
>
>
>
> My application (using a very old version of IBO):
>
> 1) Creates a Transaction object in code. (default AutoCommit is
>Is there ever a case where InOrderCount is 0? Or negative?
> 2) Creates a cursor object in code and assigns the above transaction.
>
> 3) The cursor component calls a stored procedure which calls gen_id:
>
> EndOrderNo = gen_id(gen_orderno, :InOrderCount);
>This
> 4) The Transaction component's "Commit" method never gets called.
> is probably my error however I thought generator calls/increments areYou probably ought to call commit from time to time, or insure that
> outside of the transaction.
the transaction is read only, read committed. Otherwise, you'll block
garbage collection. But that will have no effect on generators.
And, this question probably should have gone to firebird-support
@yahoogroups.com
Cheers,
Ann
[Non-text portions of this message have been removed]