2014-04-22 123 views
-3

我希望把所有caracters例(ALL!):✭& 4kasdf'224584m〜™¶ЫΔ█א〤龍龍Ѣ෴ℲɣɆ銠稥ẁ⒈محمدنهŹÉЏ 在BD。 ..對於DAT我在查表使用UTF-8:VB.NET代碼需要解決

CREATE TABLE `clan` (
    `IdClan` varchar(3) CHARACTER SET utf8 NOT NULL, 
    PRIMARY KEY (`IdClan`) 
) ENGINE=InnoDB DEFAULT CHARSET=latin1; 

但是,當我想使這個問我絲毫不計劃......作品的程序不COMPAR

Form1中:

Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click 
    Dim unGuildenIdent As New clsGuildenIdent 
    Dim unClan As New clsClan 
    unClan.IdClan = txttag.Text 
    unClan = unGuildenIdent.darUnClan(txttag.Text) 


End Sub 

ClsClan

Public Class clsClan 
    Private mIdClan As String 
    Public Property IdClan() As String 
     Get 
      Return mIdClan 
     End Get 
     Set(ByVal value As String) 
      mIdClan = value 
     End Set 
    End Property 

    Public Function darUnClan(ByVal IdClan As String) As clsClan 
     Dim unClan As New clsPClan 
     Return unClan.darUnClan(IdClan) 
    End Function 
End Class 

clsPClan

Public Function darUnClan(ByVal IdClan As String) As clsClan 
    Dim unClan As New clsClan 
    Dim sql As String 
    sql = "SELECT Premium FROM clan WHERE IdClan='" & IdClan & "'" 
    Dim resultados = ejecutarYdevolver(sql) 
    If resultados.HasRows Then 
     resultados.Read() 
     unClan = crearClan(resultados) 
    End If 
    Return unClan 
End Function 

當我✭這卡拉科特他們不給我付費,但這卡拉科特發送存在於德BD ......我有什麼錯?

日Thnx :)

回答

0

如果您創建表,變 'IDClan' 是的NVarChar,而不是爲VARCHAR

+0

這是你說什麼? OO ''CREATE TABLE'clan'( 'IdClan'的NVarChar(3)CHARACTER SET UTF8 NOT NULL, PRIMARY KEY('IdClan') )ENGINE = InnoDB的默認字符集= LATIN1;'' – user3562198

+0

是的,這是正確的 – LongArm

+0

我改變了數據庫,但仍然不工作:( – user3562198