Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Continuous invoice numbers
Message
De
15/06/2012 10:36:51
 
 
À
13/06/2012 09:57:26
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Divers
Thread ID:
01545936
Message ID:
01546087
Vues:
77
> This brings up the next question, "How do I get the invoice number?". IMO, it should not be the primary key. Use a table that has only one record and one column, the last used invoice number. USE the table, FLOCK() it, increment then number and store in both memory and the table, UNLOCK the table. Don't do anything else between those steps. It will be fast and should produce invoices in sequential order and not duplicates.

That's what I do in my code, but how do I accomplish this task on (eg) SQL Server?

Andrzej
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform