Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How good is sys(2015) in multiuser environment
Message
From
06/06/2000 13:11:00
 
 
To
27/05/2000 08:44:27
General information
Forum:
Visual FoxPro
Category:
Client/server
Miscellaneous
Thread ID:
00374031
Message ID:
00377376
Views:
31
This is what I use....GUIDs

This code, I think (it's been a while) came from Rick Strahl's website..
*** Run this once at the beginning of your app (in your MAIN.PRG)

DECLARE INTEGER CoCreateGuid ;
  IN Ole32.dll ;
  STRING @lcGUIDStruc
DECLARE INTEGER StringFromGUID2 ;
  IN Ole32.dll ;
  STRING cGUIDStruc, ;
  STRING @cGUID, ;
  LONG nSize

*** Run this as required.

PROCEDURE GetGUID
cStrucGUID=SPACE(16)
cGUID=SPACE(80)
nSize=40
IF CoCreateGuid(@cStrucGUID) # 0
   RETURN ""
ENDIF
IF StringFromGUID2(cStrucGUID,@cGuid,nSize) = 0
  RETURN ""
ENDIF
RETURN STRCONV(LEFT(cGUID,76),6)
ENDPROC
>How good is sys(2015) generated id in multiuser environment to be assigned as primary key for tables that do not have primary key of there own.
>
>
>Rajesh
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform