Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3358954
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:48:49+00:00 2026-05-18T02:48:49+00:00

I am in the process of modernizing a classic asp application that uses a

  • 0

I am in the process of “modernizing” a classic asp application that uses a Access 2000 database.

I rewrote the database on SQL Server 2008r2 and changed all of the fields to use the newer unicode enabled nchar, nvarchar, ntext and imported the old data. I also switched to IIS 7 from IIS 6

The classic asp is collecting and writing data using UTF-8.

Now the application shows the OLD data correctly in the web pages but as son as I touch it ie: UPDATE or INSERT the data is getting corrupted. I assume I need to somehow convert the UTF-8 data from the classic asp to UCS-2 somehow before I write the data into SQL server.

But how?

NOTE: it seems that sql server auto converted the utf-8 data into a usable format when it imported the data from access.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:48:50+00:00Added an answer on May 18, 2026 at 2:48 am

    You have to tell SQL Server 2008 that you are sending in unicode data by adding an N to the front of your insert value. so its like this

    strTest = "Служба мгновенных сообщений"
    strSQL = "INSERT INTO tblTest (test) VALUES (N'"&strTest&"')"
    

    The N tells SQL server to treat the Contents as Unicode. and does not corrupt the data.

    See http://support.microsoft.com/kb/239530 for further info.

    Here is test code Run on Classic ASP IIS 7 SQL Server 2008r2

    CREATE TABLE [dbo].[tblTest](
        [test] [nvarchar](255) NULL,
        [id] [int] IDENTITY(1,1) NOT NULL
    

    ASP Page

    <%
    
    Response.CodePage = 65001
    Response.CharSet = "utf-8" 
    
    strTest = Request("Test")
    
    Set cnn = Server.CreateObject("ADODB.Connection")
    strConnectionString = Application("DBConnStr")
    cnn.Open strConnectionString
    
    
    
    strSQL = "INSERT INTO tblTest (test) VALUES (N'"&strTest&"')"
    Set rsData = cnn.Execute(strSQL)
    
    %>
     <html xmlns="http://www.w3.org/1999/xhtml" charset="utf-8">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 
        <title></title>
    
    </head 
    <body>
        <form action="test.asp" method="post" name="form1" >
            <br/><br/><br/><center>
    <table border="1">
        <tr><td><b>Test SQL Write</b> </td></tr>
        <tr><td><input type="text" name="Test" style="width: 142px" Value="<%=strtext%>" /></td></tr>
        <tr><td><input type="Submit" value="Submit" name "Submit" /></td></tr></table> </center>
    </form>
    
    
    </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're in the process of building an internal, Java-based RESTful web services application that
I have a process that uses EWS Managed API to save email messages as
Current Process: I have a tar.gz file. (Actually, I have about 2000 of them,
I process a lot of text/data that I exchange between Python, R, and sometimes
In-process HSQLDB database are not expected to be opened by others, even for file-based
I'm working with a Win32 application that needs to create a variety of custom
I process lots of output from Fortran programs, and it generally appears that the
I'm in the process of downloading a 900mb XML file that a client wants
The process is explained here: http://msdn.microsoft.com/en-US/library/d1ae6tz5%28v=VS.80%29.aspx What I don't get from that article is
Every process running on a machine is given the illusion that it is the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.