Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GUID code
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01007105
Message ID:
01007290
Views:
16
Kevin,
you can use this solution... put below codes to your stored procedure
*In your database create a new function say GUID():
Function guid()
Local pGUID,rGUID
Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid
Declare Integer StringFromGUID2 In 'Ole32.dll' ;
	string rguid, String @lpsz, Integer cchMax

pGUID=Replicate(Chr(0),16)
rGUID=Replicate(Chr(0),80)

Return Iif(Inlist(UuidCreate(@pGUID),0,1824),;
	Iif(StringFromGUID2(pGUID,@rGUID,40) # 0, ;
	Strconv(Left(rGUID,76),6), ""),"")
Endfunc
*Set your PK default value to GUID() - requires c(38). Original value is a 128bits integer which you might store in c(16).
Previous
Reply
Map
View

Click here to load this message in the networking platform