J
Jeff Ledbetter
Guest
We ran into this as well.. it’s not a Windows 8.1 thing. The base64-encode function will produce identical values (as far as the 4GL is concerned) but different case. We caps and hex-encode our id’s to ensure no dupes: cUUID = caps(hex-encode(generate-uuid)). From: Thomas Mercer-Hursh [mailto:bounce-tamhas@community.progress.com] Sent: Tuesday, June 03, 2014 2:40 PM To: TU.OE.Development@community.progress.com Subject: [Technical Users - OE Development] GUID or not? 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...
Continue reading...