Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
yipchunyu
Yak Posting Veteran
80 Posts |
Posted - 2003-04-02 : 04:34:52
|
Dear sir,i don't know whether it's a really tough question or not. However, i search through the internet but still don't get a correct solution and so bothering to seek for your help.my problem is here:I get a web application to let user to input Chinese characters.The asp page will call a component (writtern by VB 6.0) in the app server and insert the values to a field with data type 'nvarchar'.However, i tried lots of methods but still can't make it work.So far from my understanding, to insert as a unicode text, i need to add sth like N'value'. is it correct?besides, some articles from the web state that the vb program need to use strconv() function to pass unicode text out to other app.I wrote sth like: Dim i As Long Dim x() As Byte x = StrConv(sResponse, vbFromUnicode, 3076) ' Convert string. For i = 0 To UBound(x) sUnicodeText = sUnicodeText & x(i) Nextbut when i inserted to SQL 2000, the values are all converted into some numbers. Anything wrong with my work? The login user's default lanuage system has some impact with it?Your kindly help is very appreicated.Look forward to hear from You.Thx a lot. |
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2003-04-02 : 07:18:20
|
A few things to check to determine where in the process it is failing.Enter some Chinese text into the field through Query Analyzer. If this works, then the problem is in the asp page. I find this is usually the case. On the page used to submit the values to the database, ensure you have set the character set to Unicode. Chances are that this processing page is not encoded correctly and does not have the correct characters when it passes the information to the database.Hope this helps.Jeremy |
 |
|
yipchunyu
Yak Posting Veteran
80 Posts |
Posted - 2003-04-02 : 10:16:00
|
joldham,thx for your tip first. i will check the coding page of the asp page first.on the other hand, is it possible to insert the same value to one field as varchar and one field as nvarchar. i need to do so as the unicode need to use in Crystal report and the double-byte is used to display in the web. (the asp page are sat as BIG5 and impossible to change the coding)BTW, any better solution than this stupid one? |
 |
|
|
|
|
|
|