Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto increment function for non primary key field
Message
From
25/10/2001 22:32:57
 
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00572783
Message ID:
00573495
Views:
31
The Mere Mortals framework contains an approach to solve auto incremental for primary keys. However, as I was telling Nadya, I’d like to keep the primary key to link it by referential integrity to another entities and not to worry about skipping the sequence.

I need a document numbering sequence “Folio” with some specific rules like:

No skipping on the sequence. Invoices should have a strict sequence which is already printed on the document (this is a law imposed by the Mexican government).

However, a user should be able to select a number ahead in the sequence and the auto incremental procedure should be able to detect the skipped number of the sequence to keep using them and discard those chosen by the users. I know this sound weird or crazy, but it has become a real need for invoice numbering implementation.

Fortunately, by the end of the day I managed to complete the numbering sequence at trigger level as expected.

Thanks and regards

Oscar Corte
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform