Subject | Re: generator of generators |
---|---|
Author | duilio_fos <irel_llc@libero.it> |
Post date | 2003-03-02T09:58:03Z |
Helen,
ok
Maybe I did not make the problem clear enough.
I have N companies accessing a (common) database.
Every time a record is inserted by company X, it must be uniquely
identified.
As M users of company X can access the database at the same time, the
only safe way to get a unique ID is to use a generator.
Theoretically, a single generator could be used by all users of all
companies, but this is not wanted.
So every company must have its own generator.
If you see another solution, please let me know.
every company is identified by a number, say N.
Gen_id (generator_N, 1)
to get the number of the next record inserted by company N.
I am eager to hear how you would solve the problem and why you judge
so bad (3 times bad) my idea :)
Thank you
Duilio
> No, it's not possible. You cannot perform any DDL in server codemodules.
ok
>I think your idea is really bad-bad-bad!!!frankly I see no other way to do it.
Maybe I did not make the problem clear enough.
I have N companies accessing a (common) database.
Every time a record is inserted by company X, it must be uniquely
identified.
As M users of company X can access the database at the same time, the
only safe way to get a unique ID is to use a generator.
Theoretically, a single generator could be used by all users of all
companies, but this is not wanted.
So every company must have its own generator.
If you see another solution, please let me know.
>How could you possibly know which generator generated a particularnumber?
every company is identified by a number, say N.
>Are you planning to read Gen_id (generatorname, 0) to count records?I am planning to read
Gen_id (generator_N, 1)
to get the number of the next record inserted by company N.
I am eager to hear how you would solve the problem and why you judge
so bad (3 times bad) my idea :)
Thank you
Duilio