Subject Re: generator of generators
Author duilio_fos <irel_llc@libero.it>
Lucas,

>But this isn't possible in SP's and triggers either

I can create a new generator programmatically, from my Delphi
application, using a TIB_DSQL object.

I can build the SQL of TIB_DSQL object to my hearth content.

So I can easily build generator_1, generator_2 etc as needed.

> Why don't you use a common generator for all?

I clearly specified it is not wanted.

From my original post: "Theoretically, a single generator could be
used by all users of all companies, but this is not wanted".

It never fails. Every time I post a message saying that option X is
not viable, somebody presses me to have a second thought and use it :)

> Your selects have to respect the Company number anyway, otherwise
you're showing data from a different company

of course.

To show others' data is the least wanted result :)

>With Gen_id (generator_N, 1) you won't get the number of records
>inserted for a company, you'll getthe number of "tried" (and maybe
>cancelled or later deleted) inserts plus 1 for the company.

both you and Helen are trying to protect me from a mistake I never
thought to make :)

Please see also my answer to Helen.

Thank you

Duilio