Subject RE: [firebird-support] Generator Question
Author Helen Borrie
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