Hello, Martin
Of course you're right - I am aware of advantages of integers. If I'd use them I'd have a lot of headaches to synchronize different databases (which is my case).
Here is the algorithm. I'm sorry, I don't remember where I gathered if from. I believe it was Cetin Basosz, but I'm not sure:
cStrucGUID=SPACE(16)
cGUID=SPACE(80)
nSize=40
IF CoCreateGuid(@cStrucGUID) # 0
RETURN ""
ENDIF
IF StringFromGUID2(cStrucGUID,@cGUID,nSize) = 0
RETURN ""
ENDIF
RETURN SUBSTR(STRCONV(LEFT(cGUID,76),6),2,36)
Thank you.
>Hi, Grigore.
>
>>I was more radical than that - I gave up using integers as PK's at all. GUID was my way, generated by the client. It's a CHAR(36). So what? :)
>
>I wouldn't do it for every PK, but I did it for distributed and disconnected environments, for example. What algorithm are you using?
Grigore Dolghin
Class Software.