binary(16) columns

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
ianbowles

binary(16) columns

Post by ianbowles » Fri 05 May 2006 15:40

I have a binary(16) column in my table, which MySql.Net returns as a column of type string. This means that character translation is done on the returned value and I end up with incorrect data. Shouldn't it be giving me a byte array by default, and how can I persuade it to do that?
Ian

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Sat 06 May 2006 09:20

Use MySqlDataReader.GetBytes() method.

ianb
Posts: 4
Joined: Tue 31 May 2005 13:21

Post by ianb » Wed 24 May 2006 03:32

thanks, that would solve part of the problem, but what if the data is being fetched into a Datatable?
Ian

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 24 May 2006 06:37

We can't change MySqlDataTable behavior because lots of queries (like "show tables") would fail. We are going to implement MySqlString class in future to solve such a problems. Look forward to our future releases.

Post Reply