Subject Re: [IBO] How to insert records in natural order? Please Heeeeeelp!!!!
Author Helen Borrie
At 05:26 PM 10/04/2003 +0000, you wrote:
>Yes, my reference is related to the generator field(ID).
>I want my records to be inserted on server in the same order I have
>them in client buffer(TIBO_query component). The client application
>takes care of records beeing in the order I want.
>There is a way to do this?

Yes.
Instead of using GeneratorLinks, call the ib_connection.Gen_ID() or
ib_dataset.Gen_ID method in the BeforeInsert event handler and store the
value in a variable. Look up the help for the syntax.

In the BeforePost event, assign the variable's value to the column.

As others have pointed out, this isn't going to guarantee that a batch of
inserts created on Client A is going to get stored in an isolatable
"bunch", since other users may well insert records (and use the generator)
before your user gets around to posting her cached inserts.

This isn't a recommended design approach for a multi-user database...you
should *not* try to implement a design that depends on natural order.

Helen