TEXT to m.lcProcs noshow Procedure GetGUID16 Local pguid Declare Integer UuidCreate In 'RPCRT4.dll' String @pguid pguid=Replicate(Chr(0),16) UuidCreate(@pguid) Return pGUID EndProc Procedure GUID16ToStr lparameters tcGUID16 Local rguid Declare Integer StringFromGUID2 In 'Ole32.dll' ; string rguid, String @lpsz, Integer cchMax rguid=Replicate(Chr(0),80) StringFromGUID2(tcGUID16,@rguid,40) Return Strconv(Left(rGUID,76),6) endproc ENDTEXT Create Database GUIDTest lcTemp = Sys(2015)+'.prg' Strtofile(m.lcProcs,m.lcTemp) Append Procedures From (m.lcTemp) Erase (m.lcTemp) Create Table GUIDTable1 ; (PKID c(16) Default GetGUID16(), ; otherfield i ) Alter Table GUIDTable1 add primary key PKID tag PKID Close All For ix=1 To 10 Insert Into GUIDTable1 (otherfield) Values (ix) Endfor Locate Browse Fields PKID, otherfield, PKDecoded = GUID16ToStr(PKID) *Close All *Erase GUIDTest.dbc *Erase GUIDTest.dc* *Erase GUIDTable1.*Cetin