>Peter,
>
>Tamar has suggested that sys(2015) is not unique across sessions.
>
>She is correct. *Definitely* there can be duplicates between simultaneous instances on a quick server.
>
>You can get around it using Windows handles (that are unique across all sessions)
>
>
DECLARE INTEGER GetActiveWindow IN user32
>? getactivewindow()
>
>
>Truncating to 5 characters: integer is only 4 (!) , BINTOC() will return 4 chars but includes chr(0) and other characters not suitable for some uses. In the old days before integer dbf fields (remember those days?!) we used an AllowedCharacter algorithm to convert integer to 4 alphanumeric chars. Hex won't work- 5 characters not enough for Windows handle.
But is activewindow() unique across users?? I don't think so.
However, in a multiuser application one might always also incorporate at least a user-specific id in the unique name.
And of course, a key is only unique for a limited number of cases. E.g. a numeric key of, let's say, 5 positions is not enough if there are potentially more that 99.999 cases. But that's a no-brainer, I guess. :)
Groet,
Peter de Valença
Constructive frustration is the breeding ground of genius.
If there’s no willingness to moderate for the sake of good debate, then I have no willingness to debate at all.
Let's develop superb standards that will end the holy wars.
"There are three types of people: Alphas and Betas", said the beta decisively.
If you find this message rude or offensive or stupid, please take a step away from the keyboard and try to think calmly about an eventual a possible alternative explanation of my message.