Subject Re: [IBO] Getting the value of a generator
Author Lester Caine
Craig Cox wrote:
> As you can probably tell, I am using the primary key in my master table to identify records in a detail table. I am getting the anticipated value of the new master record before it is committed in case the user decides not to commit. If the user commits, it all goes great unless another user happens to sneak in. This will not likely be the case in this database (famous last words). I would, however, prefer to do it the right way, but not sure how to approach it. Any suggestions on avoiding mismatches?

Just get the generator to increment itself when you access it. Every read is
guaranteed unique. May leave holes if an update is not committed, but that
should not be a problem. If you NEED an ID number that does not have any gaps,
that is normally handled in a separate field, but normally it's not necessary.

Lester Caine - G8HFL
Contact -
L.S.Caine Electronic Services -
EnquirySolve -
Model Engineers Digital Workshop -
Firebird -