>>I've checked out database. All PK/FK fields are character, not character binary. I assume they can not take these chars then.
>
>They can but since you wouldn't want to risk it + wouldn't want to change your routine, at least take out API declaration outside. Due to copyrighting I'm not sure if you could touch further.
>Cetin
I'm not sure how to move declaration outside. I tried to put it in OpenDB procedure, check DB events, but UUID() function still complained about the API function.
We can put declaration in the application and in the program itself, but then there could be a problem.
And you're right, I think extra manipulations with UUID() is the main reason for such slowness.
I sent a message to all our developers if they know why we're using modification of UUID(). I'm not expecting a response, though...
Also I think the conversion routine can be improved, so if you have ideas, they are welcome. The code was written, I think, quite long ago before VFP8...
If it's not broken, fix it until it is.
My Blog