.NET Connector and Unicode
I am running MySQL 4.16 and the latest .NET connector. My table (and the database) have the default character set of utf8.
I am trying to insert Russian text into a table. What I am getting are question marks for each character, so my text looks like ????? ????? ?? ?????.
This is a snippet of what my code looks like in C#.
cmdMySql.CommandText = "INSERT INTO tblCommunity (Details) VALUES (?Details)";
MySqlParameter P = new MySqlParameter();
P.MySqlDbType = MySqlDbType.String; (I've also tried .VarChar)
P.ParameterName = "?Details";
P.Value = sRussianText;
cmdMySql.Parameters.Add(P);
cmdMySql.ExecuteNonQuery();
When I look at the contents of the string sRussianText in the C# debugger, I see the text in Russian. As soon as this code executes, the text becomes ????? ??? in the database.
I'm at a loss as to what's wrong. Any pointers would be greatly appreciated.
Thanks.
Bob
Subject
Written By
Posted
.NET Connector and Unicode
October 20, 2004 12:32PM
November 18, 2004 06:35PM
November 20, 2004 01:25PM
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.