Subject Re: [IBO] (unknown)
Author Jason Wharton
If you can tolerate missing numbers in the series then just use a generator.
If you need an auditable series of numbers then check my web-site for the
tech info sheets to tell you how to do it. It isn't easy I'll warn you.

Regards,
Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: <rpsb@...>
To: <IBObjects@yahoogroups.com>
Sent: Wednesday, September 19, 2001 3:15 PM
Subject: [IBO] (unknown)


>
> Hi!
>
> I'm using IBO 4.2 Ed and programming in Delphi
> 6.0.
> I would like to know how can I implement a
> sequence in a table, using IBO?
> I will describe what I would like to do:
>
> I have a table, named "FACTURACAO", with a PK
> "ID_FACT". In my application, when a user inserts
> a new row, I want to have de next ID. e.g. If
> MAX(ID_FACT)=3 -> new ID_FACT=4
> I could have multiple users inserting rows at
> same time...
>
> How can I prevent that the next number is given
> only to one person? There are any way to lock the
> record when I'm reading the generator? If a user
> cancel a insert the sequence is rolled back?
>
> I see the IBO help, and I had read something
> about this, but I donĀ“t understand the explain.
>
> So, I hope you can help me...
>
> Thanks, for all
>
> Rui Batista