Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Posts
    2

    Unanswered: 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.

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    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...

  3. #3
    Join Date
    Aug 2004
    Posts
    2
    Thanx a lot!

    That did the trick

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •