Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper way to store counters
Message
From
02/06/2005 00:58:08
Randy Wessels
Screentek Business Solutions, Llc.
Phoenix, Arizona, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Proper way to store counters
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01019240
Message ID:
01019240
Views:
75
I have an application that uses 1 table that only has one record in it to store various applicaiton configuration options such as company address information, office hours, and lastly counters for various parts of the system. These counters store information such as next order number, next customer number, etc. Right now I am having a problem with duplicate numbers being assigned - sometimes to the same user, sometimes to antoher user (it is a multi-user application). I believe the problem is that the record is not being locked correctly. I would like to standardize the way these counters are being used. I am envisioning a program that I can call that I pass it the name of the counter, it correctly locks a record, updates it, and spits back the next counter number for that counter name. I am also thinking that I should use a seperate table for the counters, maybe even a seperate record for each counter. If I can;t figure out how to correctly lock the record, I might even consider using a text file to store the counter and lock the text file. Does anyone have a good solution?

Thank you!

Randy Wessels
Next
Reply
Map
View

Click here to load this message in the networking platform