Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Continuous invoice numbers
Message
From
15/06/2012 10:36:51
 
 
To
13/06/2012 09:57:26
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2003
Database:
MS SQL Server
Miscellaneous
Thread ID:
01545936
Message ID:
01546087
Views:
76
> 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
Previous
Reply
Map
View

Click here to load this message in the networking platform