Skip navigation links

MySQL Forums


Advanced Search

.NET Connector and Unicode
Posted by: Robert Sillett ()
Date: October 20, 2004 12:32PM

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

Options: ReplyQuote


Subject Written By Posted
.NET Connector and Unicode Robert Sillett 10/20/2004 12:32PM
Re: .NET Connector and Unicode Francis Kwok 10/21/2004 05:11AM
Re: .NET Connector and Unicode Robert Sillett 10/21/2004 07:38AM
Re: .NET Connector and Unicode Reggie Burnett 10/21/2004 01:58PM
Re: .NET Connector and Unicode Robert Sillett 10/22/2004 11:35AM
Re: .NET Connector and Unicode Damo 11/18/2004 06:35PM
Re: .NET Connector and Unicode Charles Bentley 11/20/2004 01:25PM


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