data storage and retrieval issue with utf8 DB
Posted by: David PHILIPPE
Date: May 09, 2005 01:35PM

Hi guys

I am currently trying to upgrade an ASP application (not .NET). This app is powered by an InnoDB database (v. 4.1.10a) with Latin1 encoding and I now need to store info in Chinese.

I have changed its encoding to Utf-8/utf8_general_ci using MySQL Administrator. Yet I am now struggling to store data in Chinese (Big5) as well as retrieving it (I only get ???).

For info the server is running Windows2003 SP1 with MyODBC v3.51. My ASP script uses the following parameters:

<%Option Explicit%>
<!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common Files\System\ado\msado15.dll" -->
Dim ObjK, CS, ObjCo, TmpCmd, ObjRec, LastID
Dim Datastore

/// This is where I retrieve data from the form ///

Set ObjK = Server.CreateObject("ADODB.Connection")
CS="Database=testsea; DSN=testsea; UID=******; PWD=******; charset=utf8"
ObjK.Open CS

Set ObjCo = Server.CreateObject("ADODB.Command")
ObjCo.CommandType = AdCmdText
ObjCo.activeconnection = ObjK
ObjCo.CommandText = "SET NAMES utf8;"
ObjCo.CommandText ="Insert into Datasheet (TbKey, TbData) values ('','"&Datastore&"');"
Set ObjCo = nothing

Set ObjK = nothing

When I then check what has been recorded using MySQL Query browser, I only see question marks.

Any help will be greatly appreciated. Thanks

Options: ReplyQuote

Written By
data storage and retrieval issue with utf8 DB
May 09, 2005 01:35PM

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.