data storage and retrieval issue with utf8 DB
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:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%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
ObjK.BeginTrans
ObjCo.CommandText = "SET NAMES utf8;"
ObjCo.execute
ObjCo.CommandText ="Insert into Datasheet (TbKey, TbData) values ('','"&Datastore&"');"
ObjCo.execute
ObjK.CommitTrans
Set ObjCo = nothing
ObjK.Close
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
David
Subject
Views
Written By
Posted
data storage and retrieval issue with utf8 DB
3054
May 09, 2005 01:35PM
1910
May 09, 2005 03:09PM
1713
June 20, 2005 05:53AM
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.