Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique ID's in inventory systems
Message
From
18/05/1999 15:18:40
 
 
To
18/05/1999 14:52:37
Jorge Haro
Independent Consultant
Juarez, Mexico
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00220153
Message ID:
00220173
Views:
25
>Probably wrong category but anyway ... I've done a couple of inventory control systems and, for every article I usually have a unique id number, given by the system, which is usually invisible to the user, and also a user assigned part number.
>
> Because of the fact that the user may change this part number, I base all my reports and query for operations involving a given part, on my system assigned unique id. I'm starting a new one and was wondering if this is the best approach.
>
>I know my new client is gonna be changing his part numbers, they asked me for a part number history tracking.
>
>I'd appreciate if you guys shared your experience with me, TIA

I generally have a system table that has a table name field and a next key number field ( Integer data type ) initialized to 1. Then create a function or method that is called to locate the appropriate table name record, lock the record retrieve the next key number, increment the key number for the next user, unlock the record. this is pretty generic and you want to provide some bulletproofing, error checking, etc., but this is how I ( and I think many others ) do it.

On the other hand there are those who swear by generating some kind of unique string-based key using an algorithm. I don't use this method so I can't give you any examples, but I'm sure some of the others who use it can and will. You can then decide which method you would like to use.

Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Previous
Reply
Map
View

Click here to load this message in the networking platform