If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Input Chinese in Access 2000 database

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-31-04, 10:40
speedytek speedytek is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Input Chinese in Access 2000 database

Hi,

My name is Sheng Feng.

I had a webapplication which can store Chinese text (codepage = 936) into a Ms Access Database. It was running on IIS server on Windows 2000 (Dutch). It was working fine till I moved the application to windows XP (Dutch). Now the data can not be stored as "real" Chinese characters, but 'ó?í etc instead.

The Chinese text is retrieved from a form of another webpage.

code looks like this

<%Language="VBScript" Codepage=936%>
<%
name = request.form("p_name")

set cn=server.createobject("adodb.connection")
strConnectString="Driver={Microsoft Access Driver (*.mdb)};dbc=c:\test.mdb"

cn.open strConnectString
sqlText = "SELECT NAME FROM BOOK WHERE ID=" & id
set rs=server.createObject("adodb.recordset")
rs.open sqlText, restaurantDb, adOpenStatic, adCmdTable

rs("NAME")=name
rs.update

.............
%>


What is funny is that when I restarted windows xp, the first update is working fine. But when I try to update for the 2nd time the Chinexe characters looks like "'ó?í" again.
Reply With Quote
  #2 (permalink)  
Old 08-31-04, 19:50
rokslide rokslide is offline
Registered User
 
Join Date: Nov 2003
Location: Christchurch, New Zealand
Posts: 1,617
I haven't used code page before,.. but according to this msdn link...

http://msdn.microsoft.com/library/de...om_resopcp.asp

You need to do something like...
Code:
Response.CodePage = 936
Response.CharSet = "utf-8"
as well as setting it at the top...
Reply With Quote
  #3 (permalink)  
Old 09-02-04, 03:26
speedytek speedytek is offline
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanx a lot!

That did the trick
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On