Monday, March 12, 2012

Problem with saving Chinese.

Hi.. I'm trying to save text into SQL 2000 database.

When user enter text in text box , the text save into variable , and show it in confirm page , after save the text to database, all the text turned into "??"

I try to view the data in SQL enterprise Manager / Web Matrix / ASP web page gridview , all of them showing the text fields in "??"

Then I try to add record which come with SQL 2000 enterprise Manager.After save the record , the chinese also turned into "??"

Is there something I need to set for database or server?

Is your datatype VARCHAR, TEXT or CHAR as the datatype on the table columns?

If VARCHAR change to NVARCHAR. If TEXT change to NTEXT. If CHAR change to NCHAR.

If you are using stored procedures (and you should be), you will to amend the parameter declaration on them.

You might want to change the collating sequence on your database to one more appropriate to Chinese (if collating sequence is meaningful for that language), but otherwise you should not need to change anything at the database level.

If this reply provides the anser to your question, please mark as such.

|||all the text are stored in varchar... I'll try to change it to nvarchar|||

yea... it works when I change all the text field type to nnvarchar..

No comments:

Post a Comment