Subject RE: [firebird-support] Generator Question
Author Kevin Stanton
Thanks Helen. Fully aware the step value > 1 only returns one number. I
use that number as the ending number in the block requested.

I've looked at the Auditable Series before but a long time ago. Probably
time to revisit it.

I've also made sure my spin edit box cannot go less than one.

Thanks,

Kevin





From: firebird-support@yahoogroups.com
[mailto:firebird-support@yahoogroups.com] On Behalf Of Helen Borrie
Sent: Wednesday, November 30, 2011 12:23 PM
To: firebird-support@yahoogroups.com
Subject: RE: [firebird-support] Generator Question





At 08:24 AM 1/12/2011, you wrote:
>I've been called worse than crazy. J
>
>Not sure what you mean by "stuff up the generator".

A negative step value sets the generator's current value (whatever it is)
back by that many.

>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 wonder if you know that sending a step value > 1 does not return multiple
numbers? It gets you one number that is <stepvalue> higher than the previous
number generated. Your caller has no way to know what the previous number
generated actually was. Even if you query the last number generated (by
using a stepvalue of zero), it's still not guaranteed to be the last number
generated by the time your call for your next number.

>I've already modified my code to make sure the InOrderCount is never <= 0.

Sounds like an improvement. But I suggest you visit the TechInfo page at
www.ibobjects.com and read the article
http://www.ibobjects.com/TechInfo.html#ti_AuditableSeries as well. :-|

./hb





[Non-text portions of this message have been removed]