VB.NET、MySQL和Unicode

VB.NET、MySQL和Unicode,mysql,vb.net,unicode,utf-8,Mysql,Vb.net,Unicode,Utf 8,如何将文本框的unicode字符串输入MySQL数据库。我更改了MySQL数据库的utf8字符集。我正在使用VB.NET2005和MySQL数据库作为窗口应用程序。请帮帮我。您只需添加 Character Set=utf8; 在连接字符串中。 例如: conn.ConnectionString = "Server=localhost; Database=db;Uid=user;Pwd=pwd;Character Set=utf8;" 您只需添加 Character Set=utf8; 在连

如何将文本框的unicode字符串输入MySQL数据库。我更改了MySQL数据库的utf8字符集。我正在使用VB.NET2005和MySQL数据库作为窗口应用程序。请帮帮我。

您只需添加

Character Set=utf8;
在连接字符串中。 例如:

conn.ConnectionString = "Server=localhost; Database=db;Uid=user;Pwd=pwd;Character Set=utf8;"
您只需添加

Character Set=utf8;
在连接字符串中。 例如:

conn.ConnectionString = "Server=localhost; Database=db;Uid=user;Pwd=pwd;Character Set=utf8;"

CharacterSet=UTF8为我工作。(
CharacterSet=UTF8;
未工作)驱动程序MySQL连接器网络6.5.4

CharacterSet=UTF8为我工作。(
Character Set=UTF8;
未工作)驱动程序MySQL Connector NET 6.5.4

尝试此方法。。这对我有用

Public ConnString As String = "Server=localhost; 
    Database=shiftd;
    Uid=root;
    Pwd=;
    Character Set=utf8;"

试试这个方法。。这对我有用

Public ConnString As String = "Server=localhost; 
    Database=shiftd;
    Uid=root;
    Pwd=;
    Character Set=utf8;"

你自己试过吗?发布一些代码并解释您希望如何改进行为您自己是否尝试过?发布一些代码并解释您希望如何改进行为