Subject Re: [ib-support] generator of generators
Author benno

----- Original Message -----
From: <irel_llc@...>
To: <>
Sent: Saturday, March 01, 2003 6:37 PM
Subject: [ib-support] generator of generators

> I want several companies to work on the same database.
> When a new company is added as a user, a new row is inserted in the
> COMPANIES table.
> When a new row is inserted in the COMPANIES, I want a new generator
> to be created. The generator will be used to identify all the company
> documents. A generator unique for all companies is not allowed for
> several reasons that I won't post here.
> I thought to have several generators created as GEN_1, GEN_2... GEN_N
> A generator would provide the unique N.
> However I stopped at the very beginning, as the following test SP
> won't compile:
> create procedure test
> returns
> as
> begin
> create generator one;
> end
> The error message is: 'token unknow "create"'
> Is there no way to create a generator from a SP ?

Perhaps you should do this using a scripting component.

Just out of curiosity, why don't you do the following.

When a company is added, give it a unique ID number (using a generator).
Than when adding records, als add this ID to the row. That way you could
identify the company.