I have the following scenario-
User may enter text in any language in the text box and need to store it in my database along with language name. Following is the code for this on button Update
Dim conStr As String = "Dsn=search;database=search;description=search;option=0;port=0;server=localhost;uid=root;CharacterSet=UTF8;"
Dim s As String = txtLanguage.Text '<----"音読み現代仮名遣い人名用漢字"
mySQL = "INSERT INTO multi_language(language, characters)" & _
" VALUES ('Japanese', '" & s & "')"
con.ConnectionString = conStr
con.Open()
cmd = New OdbcCommand(mySQL, con)
cmd.ExecuteNonQuery()
con.Close()
screen short for running the query
after clicking button the text in the Textbox
becomes '??????'
and the data inserted in the data base is like the following
Language | characters
--------------------------
Japanese | ?????
My table structure is
CREATE TABLE multi_language
(
id INTEGER NOT NULL AUTO_INCREMENT,
language VARCHAR(30),
characters TEXT,
PRIMARY KEY(id)
) ENGINE=INNODB CHARACTER SET = utf8;
when i execute the query directly in the query browser then it will executed properly,
whats wrong with my coding? what i need to add to get proper result?
This is the screenshot for the comparison of insert from the