Subject Re: [firebird-support] Re: why reset all generators?
Author Fidel Viegas
On Wed, Apr 2, 2008 at 3:59 PM, Sasa Mihajlovic <majstoru@...> wrote:

> Hi,
>
> I have procedure that pass all generators, get max(id) from table
> connected to generator and set generator value. This is good procedure
> when empy table or delete a lot of records or deploy same database to
> another user with empty documents table, etc...
>
> It is not a bad idea to reset generators, I have a specific problem
> with fiscal printers which is limited by number of aticles and I'm
> using id for fiscal printer id (for example).
>
> Sintax is: SET GENERATOR GENERATOR_NAME TO NEW_VALUE

Is you software for a single user, or does it require concurrency
(loads of users at the same time)?

It is not a really good idea to mess with generators manually.
Generators are usually used together with triggers.

What exactly are you trying to achieve? Are you trying to create
sequenced articles with no gap numbers?

Fidel.