See my responses to the other illegal mix of collation errors on this list.
-----Original Message-----
From: nil18@stripped [mailto:nil18@stripped]
Sent: Thursday, October 28, 2004 4:49 PM
To: dotnet@stripped
Subject: Illegal mix of collations
Hi!
I'm using the .NET Connector version 2, because i got a strange "read_only"
error in version 1. So i added the new dll to my directory and hoped that
the old code will work now.
But a new error occured.
I hope you can help me.
Here's the code:
private void Button1_Click(object sender, System.EventArgs e)
{
string x="'"+tb2.Text+"%'";
string bla = "SELECT * from name where Name like "+x;
string cs = "SERVER = localhost; DATABASE = gerrit; UID = root;
PASSWORD=vikings;";
MySql.Data.MySqlClient.MySqlConnection con = new
MySql.Data.MySqlClient.MySqlConnection(cs);
MySql.Data.MySqlClient.MySqlCommand test = new
MySql.Data.MySqlClient.MySqlCommand(bla,con);
con.Open();
MySql.Data.MySqlClient.MySqlDataReader read = test.ExecuteReader(); //
here is the error
while(read.Read())
{
string Name = (string) read["Name"];
tb.Text = tb.Text + " " +Name+ "\n";
}
read.Close();
read=null;
con.Dispose();
con.Close();
con=null;
}
The error is following:
#HY000Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and
(utf8_general_ci,COERCIBLE) for operation 'like'
Zeile 60: MySql.Data.MySqlClient.MySqlCommand test = new
MySql.Data.MySqlClient.MySqlCommand(bla,con);
Zeile 61: con.Open();
Zeile 62: MySql.Data.MySqlClient.MySqlDataReader read =
test.ExecuteReader(); // here is the error
Zeile 63: while(read.Read())
Zeile 64: {
I really hope you can help me!
Thank you very much.
Greetings from Austria
Gerrit
-------------------------------------------
Versendet durch AonWebmail (webmail.aon.at)
--
MySQL on .NET Mailing List
For list archives: http://lists.mysql.com/dotnet
To unsubscribe: http://lists.mysql.com/dotnet?unsub=1