Versions des environnements
> 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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement