Subject | RE: [firebird-support] Generator Question |
---|---|
Author | Kevin Stanton |
Post date | 2011-11-30T19:24:41Z |
I've been called worse than crazy. J
Not sure what you mean by "stuff up the generator".
The point of passing the step value is the sales rep can ask for more than
one order number at a time. He/she can generate blocks of orders that have
the same order characteristics but ship at different times and each
different shipment needs a unique order number.
I've already modified my code to make sure the InOrderCount is never <= 0.
Thanks Helen
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Wednesday, November 30, 2011 11:04 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Generator Question
At 07:26 AM 1/12/2011, Kevin Stanton wrote:
is ever 0 and an *end-user" will decrement the generator (for everyone!) if
it is ever negative.
the generator will get stuffed up. ;-)
./heLen
[Non-text portions of this message have been removed]
Not sure what you mean by "stuff up the generator".
The point of passing the step value is the sales rep can ask for more than
one order number at a time. He/she can generate blocks of orders that have
the same order characteristics but ship at different times and each
different shipment needs a unique order number.
I've already modified my code to make sure the InOrderCount is never <= 0.
Thanks Helen
From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Wednesday, November 30, 2011 11:04 AM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Generator Question
At 07:26 AM 1/12/2011, Kevin Stanton wrote:
>I have a customer that reports from time to time that my application isIMO, this is crazy. You'll get a dup generator if the InOrderCount variable
>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 False)
>
>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);
is ever 0 and an *end-user" will decrement the generator (for everyone!) if
it is ever negative.
>4) The Transaction component's "Commit" method never gets called. ThisYes, they are. But if you send a call that will stuff up the generator then
>is probably my error however I thought generator calls/increments are
>outside of the transaction.
the generator will get stuffed up. ;-)
>Can someone confirm the errors of my ways? Thanks in advance!What's the point of passing the step value as a variable, anyway?
./heLen
[Non-text portions of this message have been removed]