Forum Post: GUID or not?

  • Thread starter Thread starter Thomas Mercer-Hursh
  • Start date Start date
Status
Not open for further replies.
T

Thomas Mercer-Hursh

Guest
In some current code, I have been using base64-encode(generate-uuid) to get a character GUID to use as a record identifier. In Windows 7, it works fine. In Windows 8.1 it is coming up with duplicates. In particular, this test program: define temp-table ttKeys no-undo field chID as character field inCnt as integer index ixID as primary unique chID index ixCnt as unique inCnt. define variable pinCnt as integer no-undo. define variable pinLimit as integer no-undo initial 400000. repeat while pinCnt pinLimit: create ttKeys. assign pinCnt = pinCnt + 1 ttKeys.chID = base64-encode(generate-uuid) ttKeys.inCnt = pinCnt . catch eobSysError as Progress.Lang.SysError : define variable inWhich as integer no-undo. message substitute("Unexpected Exception: &1", eobSysError:getMessage(1)) view-as alert-box. message substitute("Count = %1", pinCnt) view-as alert-box. end. end. if pinCnt = pinLimit then message "Success" view-as alert-box. will pretty consistently produce a duplicate key, although sometimes it is 330000 records in before that happens. With Windows 7, we have gone to a million with no dups. Do I have some misunderstanding in thinking this should work or is the 8.1 behavior a bug. TS is working on it.

Continue reading...
 
Status
Not open for further replies.
Back
Top