Subject | Re: [ib-support] Generator and Triggers with IB6 from Delphi and IBX |
---|---|
Author | Andrew S. Vaz |
Post date | 2001-05-20T03:01:04Z |
Hi Robert,
populate the primary key and another one as the "reference-name-key"(wierd
name, but I believe that it illustrates the use).
It worked like this, when populating the tables at the user entry level, a
generator was used to give me the primary key (ex: 10), after all the fields
and whatever else was ok, and only when I confirmed that it was going to be
a valid entry, I fetched a number from the "reference key generator". The
only part that is annoying is that when the users wanted to find something,
I had to fetch the master record to find out what is value of the original
PK.
To tell the truth, I had an app in Paradox that used this approach and when
I "translated" it to Interbase, I kept the same scheme (it worked so well
that I decided to keep the stuff working in the same way). :)
Andrew
>lock".
> > I believe the problem showed up at about 50 users. Rather than waiting
> > quietly for the "cumulative" record to be free, they'd get an error and
> > retry immediately. Eventually, the volume of retries overwhelmed the
> > server, leading to more retries, etc. I believe it's called "live
>delay so all
> The way I did it, the retry is in a loop with a random number used as a
> the others are retrying at random intervals and nothing got locked into arepeated
> collision.The only way I got something like this to work was using a Generator to
>
populate the primary key and another one as the "reference-name-key"(wierd
name, but I believe that it illustrates the use).
It worked like this, when populating the tables at the user entry level, a
generator was used to give me the primary key (ex: 10), after all the fields
and whatever else was ok, and only when I confirmed that it was going to be
a valid entry, I fetched a number from the "reference key generator". The
only part that is annoying is that when the users wanted to find something,
I had to fetch the master record to find out what is value of the original
PK.
To tell the truth, I had an app in Paradox that used this approach and when
I "translated" it to Interbase, I kept the same scheme (it worked so well
that I decided to keep the stuff working in the same way). :)
Andrew