473,785 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Coding Problem

Dear all,

I am now creating a website which have 3 languages (English, Simplified
Chinese and Traditional Chinese). The server has installed English version
Window 2000 (Server Version, Default Codepage is Traditional Chinese) and
MSSQL 2000 (English). I have created a database which use the codepage
"chinese_PR C". However, when I created an testing asp pages ( 1 textbox and
it will insert the content into the table), it cannot store the chars in
correct coding. I would like to know whether asp or MSSQL has something
wrong in my setting? Thank you for all of your help.

Alex Yung
Jul 21 '05 #1
2 1824
You really need to give the error you are getting and maybe some sample data
you are trying to store.
If you are trying to store characters from another language that English,
does you db have the appropriate nchar
columns?

AJ
Jul 21 '05 #2
hi AJ,
here 's the 3 files , 1 form, 1 for inserting the records and 1 for
display in the screen

Form
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScri pt CodePage=936 %>
<%
'mySmartUpload. form("c").value s
'ENCTYPE="multi part/form-data"
%>
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<form action="test3.a sp" method="post" ENCTYPE="multip art/form-data">
<input type="text" name="c" value="" />
<input type="submit" name="submit" value="submit">
</form>
----------------------------------------------------------------------------
--------------------

Insert data
----------------------------------------------------------------------------
--------------------
<%@ Language=VBScri pt CodePage=936%>
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<%
'Here I use aspSmartUpload to handle my data; however, it also doesn't work
when I use request object
Set mySmartUpload = Server.CreateOb ject("aspSmartU pload.SmartUplo ad")
mySmartUpload.C odepage = 936
mySmartUpload.U pload()
Set linkptr = CreateObject("A DODB.Connection ")
linkptr.Open "Provider=sqlol edb.1" & _
"Persist Security Info=True;" & _
"Data Source=127.0.0. 1;" & _
"Initial Catalog=test;" & _
"User Id=abc;" & _
"Password=; "

sql = "insert into test (content) values ('" & mySmartUpload.f orm("c") &
"')"
linkptr.Execute sql
Response.Write sql
linkptr.Close
set linkptr = nothing

%>
----------------------------------------------------------------------------
--------------------
Display
----------------------------------------------------------------------------
--------------------
<meta http-equiv="content-type" content="text/html; charset=gb2312" >
<%
Set linkptr = CreateObject("A DODB.Connection ")
' User ID: karin
' Pwd: irasia
linkptr.Open "Provider=sqlol edb.1" & _
"Persist Security Info=True;" & _
"Data Source=127.0.0. 1;" & _
"Initial Catalog=test;" & _
"User Id=abc;" & _
"Password=; "

sql = "select * from test"
Set rs = CreateObject("A DODB.RecordSet" )
rs.CursorType = 3
rs.CursorLocati on = 3
rs.LockType = 3
rs.open sql, linkptr

while not rs.eof
response.write rs.fields("cont ent") & "<br>"
rs.movenext()
wend

rs.close
linkptr.Close
set rs = nothing
set linkptr = nothing
%>
----------------------------------------------------------------------------
--------------------
"Anthony Judd" <ad**********@o ptusnet.com.au> ¼¶¼g©ó¶l¥ó·s»D
:u3************ **@TK2MSFTNGP14 .phx.gbl...
You really need to give the error you are getting and maybe some sample data you are trying to store.
If you are trying to store characters from another language that English,
does you db have the appropriate nchar
columns?

AJ

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1854
by: Berthold Höllmann | last post by:
I have a default coding header # -*- coding: iso-8859-15 -*- in my python files. I now have Problems with this settings. I swithched to Python 2.4.1 under Windows. When I import files with the above coding header I get frequent syntax errors with files that work flawlessly under Linux. The Syntax error usually appear near continuation lines of the form
2
1827
by: manning_news | last post by:
Has anyone had a problem with Access 2003 not saving their coding? I've been using 2003 for a couple of months now and just this week noticed that some coding I'd done for a database was not there anymore. I reentered it and didn't have any problems for a couple of days. Today I entered some coding, saved it, opened another database, and when I opened my original database again, the coding I had entered was missing. Access 2000 always...
144
6962
by: Natt Serrasalmus | last post by:
After years of operating without any coding standards whatsoever, the company that I recently started working for has decided that it might be a good idea to have some. I'm involved in this initiative. Typically I find that coding standards are written by some guy in the company who has a way of coding that he likes and then tries to force everybody else to write code the way he likes it, not for any rational reason, but simply for the...
1
1709
by: R Reyes | last post by:
Hello All, I'm always looking for ways to improve my code. Most of the time (whenever I'm working on a project) I write a bunch of functions. Then after the project is finished, I put all the similar functions into their own module/class/page for neatness: -- like a stringsManipulate class which has all string manipulation methods to the project...separated from the whole project into its own library for neatness. -- like a...
20
1671
by: TJ Doherty | last post by:
Need help understanding the following please: When I am creating a project and code my connection using Dim connectString As String = "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\Temp\NW-test.MDB", everything works correctly when I run the project. However, if I set up the exact same connection using the DataAdapter wizard and try to run the project, I get a "Microsoft Jet database engine cannot open the file..." error.
4
2015
by: Josh Golden | last post by:
i lead a small development team (based on some of my posts that might cause some people to choke themselves, but have no fear, i am NOT the lead developer, the people on my team are great - i'm just the manager) for my company. although we attempt to use good practices for development, we have no real experience in documentation of a project _before_ it's coded. Are there any great books out there on how to document a project before we...
8
1451
by: Ilias Lazaridis | last post by:
Where can I find practical coding examples for real life coding problems? Something like a categorized solution guide? - My current problem: * create a folder * seems to be: os.mkdir(path)
7
4965
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already developed significant content for the C programming language that is available at: https://www.securecoding.cert.org/ by clicking on the "CERT C Programming Language Secure Coding Standard"
0
1678
by: pat | last post by:
CodeCheck Coding Standard's Support As a free service to our customers we offer support in developing "rule-files" for automating corporate coding standards. If you have a coding standard that you wish to automate please send the standard to us in PDF format so we can assist in developing the automation with codecheck. If you are developing codecheck rule-files and have a particular
8
2112
by: =?ISO-8859-1?Q?Arnaud_Carr=E9?= | last post by:
Hi all, I guess you all know how difficult it is to choose a conding standard. And even more difficult it is to explain the choice to your dev team :-) I'm looking for an "official" c++ coding standard of a large firm such as Microsoft, Intel or any other like this. I "google" it but I don't find any "ready to use" document. Anyone have a good URL to a complete coding standard, used in a large
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9959
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4063
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.