Re: Guid (UUID) and varbinary(16) just fails
Posted by: Espen Berglund
Date: March 29, 2006 05:39AM

I ended up storing the GUID as a string since the GetGuid() function in the driver assumes guids are a string. I did however debug into driver, and I found a way to fix/get around it. The error seems to be in MySqlValue.cs. In the method GetMySqlValue you should change:

case MySqlDbType.VarChar:
return new MySqlString(null,type);

to

case MySqlDbType.VarChar:
if (binary) return new MySqlBinary(null, type);
return new MySqlString(null, type);

I'm not sure what implications this has on any other types or functionality though. As mentioned I changed the datatype to varchar(36) instead. Feel free to dig further into it though ;)

Options: ReplyQuote


Subject
Written By
Posted
Re: Guid (UUID) and varbinary(16) just fails
March 29, 2006 05:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.