Subject Re: [firebird-support] UUDIs/GUIDs and problem with uuidlib
Author Daniel Albuschat
2006/7/18, lutterot <lutteroth@...>:
> Hello!
> I need to use UUDIs/GUIDs as primary keys in my DB and was trying to
> generate/convert them with the uuidlib UDF library available on
> IBPhoenix.

Don't do this. It's fine to have a UUID as a separate, unique field
but having it
as a primary key is not good, not at all.

> Unfortunately, this library has a problem when converting between its
> UUIDs (which are represented as CHAR(22)) an the common textual GUIDs
> (CHAR(36)). When I generate a UUID and use UUID_TO_GUID to get the
> corresponding GUID, and then GUID_TO_UUID to get the original UUID,
> then I do not get the UUID that I generated in the first place.

Why do you use two different UID-techniques in one and the same database?
Isn't it possible to just stick with one?

> Is there another library available that can deal with this issue? Or
> do you have any other solutions (maybe a newer uuidlib version)?
> I am using C# for this project and was thinking about creating GUID
> UDFs in C#, but unfortunately there seems to be hardly any
> documentation on implementing UDFs with .net.

Implementing UDFs in .NET would be quite a waste of both, programming
time and CPU cycles.

eat(this); // delicious suicide