Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Auto incr number or GUID?
Message
From
28/10/2003 03:56:47
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
 
To
28/10/2003 02:52:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00842581
Message ID:
00843407
Views:
28
I've tried hard this, didn't got even a single one within 10 milions iterations, made me believe that SYS(2015) wait a milisecond before return the value.

>I see. FYI sys(2015) duplication on fast computers are reported (I haven't yet see myself - mine counts as a very slow box these days).
>PS: MP boxes might duplicate it as well. However under normal circumstances unlikely.
>
>I wonder how you can have a unique stationID ? Wouldn't it at least require 6 bytes ?

When app starts, it checks for the workstation id in local configuration file. This WsId is a 3 chars string converted from an autoincrementing integer (in my case a Firebird SQL generator). If is not there, then just query the next integer id from server (needs an active connection), convert it and store in config file. It is very sure that keys generated will be unique. I used this way for a client-server app and we hadn't even a single error regarding duplicated PK's. Also a table on server is updated with data queried from user machine (computer name, user, workgroup, etc).



>Cetin
>
Previous
Reply
Map
View

Click here to load this message in the networking platform