General information
Category:
Coding, syntax & commands
Title:
Proper way to store counters
Environment versions
Network:
Windows 2003 Server
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only