troubleshooting Question

Insert chinese character into mysql via vb.net

Avatar of beginner80
beginner80 asked on
MySQL Server
4 Comments1 Solution1327 ViewsLast Modified:
I manage to insert chinese character into mysql 4.0.20d by using these codes:

'--- source is chinese character
 Dim source As Byte() = Encoding.UTF8.GetBytes(btext)

'--- strBText is the string stored in mysql æ–°å¹´
 Dim strBText As String = Encoding.UTF8.GetString(source, 0, source.Length)

mySqlCommand.CommandText = "INSERT INTO table1(b) VALUES ('" & strBText  & "')"

However, when I move my application to live server which is using newer version of mysql (5.0.0alpha), these lines no longer work!!!

Please advice.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros