Strings returned as Byte[]

Strings returned as Byte[]

Postby joy87 » Wed 11 Apr 2012 20:37

i'm using mysql connector version 6.6 and mysql server 5.5.
earlier when i was using the older versions of mysql and devart connector string was returned from db as string but when i updated both the string is now returned as Byte[].
Can u tell me what the issue is??
joy87
 
Posts: 2
Joined: Fri 10 Feb 2012 09:24

Postby Shalex » Thu 12 Apr 2012 09:39

We have answered you by e-mail.
Shalex
Devart Team
 
Posts: 7608
Joined: Thu 14 Aug 2008 12:44

Re: Strings returned as Byte[]

Postby Chunki » Wed 09 May 2012 07:02

same issue here, though I use MySQL 5.1 and dotConnect for MySQL 6.80.350. Could you tell me why does it happen, and how to fix it?
Chunki
 
Posts: 1
Joined: Wed 09 May 2012 06:52

Re: Strings returned as Byte[]

Postby Pinturiccio » Fri 11 May 2012 08:39

Chunki wrote:Could you tell me why does it happen, and how to fix it?

It was done to add a possibility to convert byte array to a string with a needed encoding, not only with the default one.
We have implemented a new public static class OldCompatibility starting from the 5.80.190 build of dotConnect for MySQL. Please use it in the following way to obtain the previous behaviour ( binary (MySQL) -> string (.NET)):

Code: Select all
OldCompatibility.BinaryAsString = true;
MySqlConnection conn = new MySqlConnection("User id=root;pwd=root;port=3306;host=localhost;database=test");
conn.Open();
Pinturiccio
Devart Team
 
Posts: 1953
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for MySQL