Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Could not insert/udte Chinese characters in SQL 2000

14 views
Skip to first unread message

Simon

unread,
Feb 28, 2007, 9:18:25 AM2/28/07
to
Hi,

I am using ASP and ODBC to connect SQL 2000. However, it could not
insert/update Chinese charactesrs to the SQL 2000 database.

The configuration is as below:
Windows 2003 Server Chinese (Traditional Chinese) version
SQL 2000 Chinese version
Databae collation: SQL_Latin1_General_CP850_CI_AS
column datatype: nvarchar

When I inserst Chinese characters to the database, it appears ???? instead
of Chinese characters.

Could you give me an idea to solve the problem?

Thanks,
Simon

t-qi...@prcvap.microsoft.com

unread,
Feb 28, 2007, 10:34:12 PM2/28/07
to
Hello Simon:

I think it is because that SQL Server 2000 doesn’t support UTF-8.The Unicode encoding method SQL uses is UCS-2.Once you sent your Chinese test into the database,it cannot be decoded correctly.

1)
That is, you need to set your ASP form encoding as unicode to ensure that SQL 2000 can figure it out.

Description of storing UTF-8 data in SQL Server:
http://support.microsoft.com/kb/232580/en-us

2)
Would you mind trying to make the explicit declaration as nvarchar when you execute the query with Chinese characters like the following sample:

insert tb values(N'中文')




If you have any questions about it, please feel free to ask.
Thanks.

Sincerely,
Doris Ji
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "(Reply to Group)" via your
newsreader so that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.

t-qi...@prcvap.microsoft.com

unread,
Mar 4, 2007, 9:12:19 PM3/4/07
to
Hello Simon:

If you still have any questions about it, please feel free to ask.
Thanks.

Sincerely,
Doris Ji
Microsoft Online Support
Microsoft Global Technical Support Center

Get Secure! - www.microsoft.com/security
=====================================================
When responding to posts, please "(Reply to Group)" via your newsreader so that others may learn and benefit from your issue.
=====================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

LCW

unread,
Oct 14, 2008, 12:21:00 PM10/14/08
to
I faced similar problem as well. If i do a response write of the constructed
sql statement, the chinese character is shown correctly in the insert
statement. Copy paste this statement in to query analyzer, the chinese
character is inserted successfully.

But if i execute the insert statement from the asp page, the chinese
character is inserted as garbled text, like ä½ å¥½å —ï¼ ï¼ , instead of 你好吗!!

What should i do?
--
Regards
LCW


"t-qi...@prcvap.microsoft.com" wrote:

> Hello Simon:
>
> I think it is because that SQL Server 2000 doesn’t support UTF-8.The Unicode encoding method SQL uses is UCS-2.Once you sent your Chinese test into the database,it cannot be decoded correctly.
>
> 1)
> That is, you need to set your ASP form encoding as unicode to ensure that SQL 2000 can figure it out.
>
> Description of storing UTF-8 data in SQL Server:
> http://support.microsoft.com/kb/232580/en-us
>
> 2)
> Would you mind trying to make the explicit declaration as nvarchar when you execute the query with Chinese characters like the following sample:
>
> insert tb values(N'中文')
>
>
>
>
> If you have any questions about it, please feel free to ask.
> Thanks.
>
> Sincerely,
> Doris Ji
> Microsoft Online Support
> Microsoft Global Technical Support Center
>
> Get Secure! - www.microsoft.com/security
> =====================================================

> When responding to posts, please "(Reply to Group)" via your

> newsreader so that others may learn and benefit from your issue.
> =====================================================

> This posting is provided "AS IS" with no warranties, and confers no
> rights

ahmed

unread,
Jun 1, 2010, 7:33:01 AM6/1/10
to
i have the same problem in sql server 2005 and i try to do this and still not
working
0 new messages