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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 OpenXML for Chinese Characters

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2002-04-19 : 08:50:38
Mallikarjun S Bendigeri writes "Hello,
We are facing problem while inserting a record using OpenXML into a Table in SQL SERVER 2000 installed with Chinese Langauge. Here is details of the SQL Server 2000

OS- Windows 2000 Server
Database- SQL SERVER 2000 (with Chinese code page 936 - Simplified Chinese)
DLL - VB Component

we use Command Object for insertion . The Command object properties are
.CommandText = "cp_InsertCustomer"
.CommandType = adCmdStoredProc
.connection=ObjConnection
.Parameters.Append .CreateParameter("@Customerdata", adVarChar, adParamInput, Len(strXML), strXML)

Here strXML has the XML Data -----
XML has the Declaration : <?xml version="1.0" encoding="gb2312"?>

The cp_InsertCustomer takes a Parameter of Text data type

This works very fine for English Language Data But for Chinese Langauge it returns a XML parsing Error

For Testing Purpose we returned the string Data recieved by the Stored Proceedure.
Here we found that the input string was truncated.

For ur information the input string does not cross the 8000 varchar size limit.

Can U Help Us at the earliest.
Regds
Mallikarjun"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2002-04-19 : 09:10:41
Instead of varchar, use nvarchar for your data type. It allows international character storage. Be aware though that the maximum for nvarchar is 4000 characters (2 bytes per character=8000 bytes) If you need to store more, you can use ntext. These are documented in Books Online.

Go to Top of Page
   

- Advertisement -