Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Guid
Message
De
12/04/2005 08:25:27
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Re: Guid
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Divers
Thread ID:
01003650
Message ID:
01003663
Vues:
17
>To All,
>
>In sql2k there is a newid() function that returns a guid, is there something similar in vfp, either a function or a routine?
>
>Thanks.
>
>Frank
	Procedure getUniqueID() As String
		Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid
		Declare Integer StringFromGUID2 In 'Ole32.dll' ;
			string rguid, String @lpsz, Integer cchMax
		Local pguid,rguid
		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), ""),"") && 1824 = LOCAL_ONLY
	Endproc
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform