Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Unique key based on timestamp
Message
From
01/11/2004 09:29:19
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00952187
Message ID:
00956523
Views:
9
>I want to create a unique record key that is based on timestamp. So when I sort the records on this key, they are sorted in datetime order.
>
>Any ideas how to create this unique key? Would like it to not be a date field, and to be as precise as possible, and as short in length as possible.
>
>Realize that I will have to check for duplicate key prior to inserting a new record as that two records quickly inserted might get a duplicate key.
>
>vfp 6.0.
>
>Thanks
>
>Brenda

Brenda,
For that order I think what you need is 'no order'. I mean physical entry sequence already sorts in order they're entered to system.
For a primary key (debatable but my personal preference) use a GUID.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform