MySQL Charset problem with VS2005
Posted by: Hiong Ping Moh
Date: January 29, 2007 01:31AM

Hi all, I'm using VS2005 (vb.net) with MySQL Server 5.0, and my .NET connector is version 1.0.7.

I have problem saving chinese characters into my table, the following is my VB codes:
myComm.CommandText = "insert into ded_ref2 values(" & _
iDed_ID & ", " & _
"'" & sDed_Name & "', " & _
"'" & sGL_Code & "')"
where sDed_Name could be a chinese character.
My table structure is:
CREATE TABLE `tmms`.`ded_ref2` (
`ded_id` smallint(5) unsigned NOT NULL default '0',
`ded_name` varchar(45) character set gb2312 collate gb2312_bin NOT NULL default '',
`gl_code` varchar(30) character set latin1 NOT NULL default '',
PRIMARY KEY (`ded_id`)
) ENGINE=InnoDB DEFAULT CHARSET=gb2312;

The command executed successfully, without giving errors, and the ID and gl_code are inserted without problem, but as long as a chinese character is used in the name, it becomes "?" mark.

May I knoe what went wrong and how should I walk around it?

Thanks in advance

Options: ReplyQuote


Subject
Written By
Posted
MySQL Charset problem with VS2005
January 29, 2007 01:31AM


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.