Subject Re: [ib-support] Re: generator of generators
Author Helen Borrie
At 11:58 PM 1/03/2003 +0000, you wrote:
> > When a company is added, give it a unique ID number (using a
> > Than when adding records, als add this ID to the row. That way you
>could identify the company.
>the problem of getting a number to identify the company is trivial.
>What I need is to provide the new company with a generator (unique to
>the company) with which the company will identify (count) its records.
>I can easily create the new generator I need programmatically, e.g.
>by a using a TIB_DSQL.
>I just thought it would be smart to have the generator created in the
>After Insert trigger of the COMPANIES table.
>Alas, it seems not possible.

No, it's not possible. You cannot perform any DDL in server code modules.

I think your idea is really bad-bad-bad!!! How could you possibly know
which generator generated a particular number? Are you planning to read
Gen_id (generatorname, 0) to count records?