Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Auto increment function for non primary key field
Message
De
28/10/2001 11:51:15
 
 
À
25/10/2001 22:32:57
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00572783
Message ID:
00574246
Vues:
34
>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

Oscar,

I had the same rule for an application I recently wrote. I finally wrote a custom stored procedure and called it only when the save mthod in my bizobj was called (not in the onnew method).
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform