>Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid >Declare Integer StringFromGUID2 In 'Ole32.dll' ; > string rguid, String @lpsz, Integer cchMax > >CREATE CURSOR myIntGuids (guid i) >LOCAL lnId >FOR ix=1 TO 100000 > lnId = val(sys(2007,guid(),1,1)) > DO WHILE m.lnId > 0x7FFFFFFF > lnId = val(sys(2007,guid(),1,1)) > enddo > INSERT into myIntGuids values(m.lnID) >endfor >SELECT guid FROM myIntGuids HAVING COUNT(*) > 1 group BY 1 > >PROCEDURE guid > Local pguid,rguid > pguid=Replicate(Chr(0),16) > rguid=Replicate(Chr(0),80) > > UuidCreate(@pguid) > StringFromGUID2(pguid,@rguid,40) > RETURN Strconv(Left(rguid,76),6) >ENDPROC >Neat... I remember seeing the code to create GUID from VFE, but it seemed to be a bit longer... and they didn't have to loop until integer's right, because they went with an 8-byte as c(16) when converted to hex.