Hi,

The internal structure of the GUID in Firebird doesn't match the Microsoft's
GUID.

With the FB 2.5 alpha 1 there are two new GUID function:
UUID_TO_CHAR and CHAR_TO_UUID.


INSERT INTO T(G)
VALUES(CHAR_TO_UUID('12345678-1234-1234-1234-123456789ABC'));

SELECT UUID_TO_CHAR(G) FROM T;
Result: '12345678-1234-1234-1234-123456789ABC'

Result by FB.NET client SELECT G FROM T: (FB.NET handles CHAR(16) OCTETS as
Guid)
'56781234-1234-1234-3412-34127856BC9A'


So if I have a database preparation script with special GUID values then I
wrote
a .NET program using FB.NET client the GUIDs would be mismatched.
Maybe think this is a FB bug.


typedef struct _GUID {
    unsigned long  Data1;
    unsigned short Data2;
    unsigned short Data3;
    unsigned char  Data4[ 8 ];
} GUID;


struct FB_GUID {
    USHORT data[8];
};


Regs,
Zoltán
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Firebird-net-provider mailing list
Firebird-net-provider@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/firebird-net-provider

Reply via email to