dbTalk Databases Forums  

How to insert 'Simplified chinese' into database?

microsoft.public.sqlserver.programming microsoft.public.sqlserver.programming


Discuss How to insert 'Simplified chinese' into database? in the microsoft.public.sqlserver.programming forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
wangyang
 
Posts: n/a

Default How to insert 'Simplified chinese' into database? - 12-09-2004 , 03:25 AM






Dear all:

I create a database with collation name='Chinese_Taiwan_Stroke_CI_AS'. and
then I create a table with collation name='Chinese_PRC_Stroke_CI_AI ' by
using the following code.

CREATE TABLE [dbo].[article_choice_sc] (
[article_id] [int] NOT NULL ,
[issue_date] [smalldatetime] NULL ,
[issue_no] [int] NULL ,
[section_name] [nvarchar] (100) COLLATE Chinese_PRC_Stroke_CI_AI NULL ,
[filename] [nvarchar] (100) COLLATE Chinese_PRC_Stroke_CI_AI NULL
) ON [PRIMARY]

when I insert 'Simplified chinese' to the table,I see messy code in
[section_name] & [filename].

Question:How to solve this problem?


Reply With Quote
  #2  
Old   
David
 
Posts: n/a

Default Re: How to insert 'Simplified chinese' into database? - 12-09-2004 , 03:41 AM






*有*nvarchar的話
應該就可以*unicode
在enterprice manager應該可以*常顯示
charset的問題 程式端與資料庫端均需考慮

David

Reply With Quote
  #3  
Old   
wangyang
 
Posts: n/a

Default Re: How to insert 'Simplified chinese' into database? - 12-09-2004 , 04:23 AM



Dear David:
I have set nvarchar.Would you tell me what I should do in programme & SQL
Server.Thanks for your help.

"David" wrote:

Quote:
*有*nvarchar的話
應該就可以*unicode
在enterprice manager應該可以*常顯示
charset的問題 程式端與資料庫端均需考慮

David


Reply With Quote
  #4  
Old   
David
 
Posts: n/a

Default Re: How to insert 'Simplified chinese' into database? - 12-13-2004 , 03:46 AM



[myTable]
id(int)
myName(NVarchar)

try it:
INSERT INTO myTable (id, myName)
VALUES (100, N'时间和*言设置居然这么重要')

直接在SQL Server Enterprise Manager裡面看
可顯示簡體*
記得要在欲insert的變數前面*上這個N

David

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.