Subject RE: [ib-support] Re: generator of generators
Author Alan McDonald
dulio,
have you put some thought into how you are going to manage the use of one
generator over another each time a record is inserted?
You'd have to check that a user inserting a record is from a particular
company first, then select the appropriate generator, so you'll need a users
table too won't you? so you can assign users to companies?

Sounds very cumbersome (the trigger I mean) to me but I'm sure you know what
you're doing...

Alan

-----Original Message-----
From: duilio_fos <irel_llc@...> [mailto:irel_llc@...]
Sent: Monday, 3 March 2003 10:19 AM
To: ib-support@yahoogroups.com
Subject: [ib-support] Re: generator of generators


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




To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/