At 11:45 AM 6/7/2004 -0700, Larry Lustig wrote:

Usually I just use autonumber columns and don't worry
about missing values (in the event a user deletes a
row).  Now I need to write an application that
consecutively numbers records (no gaps in the
sequence).  I also have an autonumber field to use as
the PK.

My inclination is to handle the numbering in an ON
AFERT INSERT trigger, using the NEXT function against
a "dummy" autonumber table to get the value.

Does anyone have any thoughts or other suggestions on
how to handle this task?


Larry,

I have a different technique to use the procedure of
automating numbers, accordingly.

Take a look at the "New Sales Order" process in RRBYW7
or RRBYW8 sample applications bundled with RBG7.

You can start as many sessions as you wish to simulate
the multi-user environment and entering the Sales Order
(with unique invoice number TransID). Each sales order
"processed" will get the unique TransID before INSERTing
the actual row(s) in InvoiceHeader and InvoiceDetail.

Hope that give you an idea!

As always, there are more than on way to skin a cat!

Very Best R:egards,

Razzak.



Reply via email to