SQL-Server

Moderators: None (Apply to moderate this forum)
Number of threads: 435
Number of posts: 788

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Problem when save unicode to NVARCHAR field... Posted by vndp on 19 Nov 2007 at 4:01 AM
I use this C# codes to save unicode text into NVARCHAR field (SQL SERVER 2005 EXPRESS):

DataRow row;
row = cData.DatTable.Rows[i];

row.BeginEdit();

row["CompanyName"] = txtCompanyName.Text;
//...

row.EndEdit();

cData.DatAdaptor.Update(cData.DatSet, TableSelect);
cData.DatSet.AcceptChanges();


When I input some unicode text into txtCompanyName,
it is save SQL SERVER like that: "B?n ph?i nang d?ng"

How can I solve this problem?
Thanks for reading!
Report
Re: Problem when save unicode to NVARCHAR field... Posted by bradwang on 25 Dec 2007 at 7:43 PM
: I use this C# codes to save unicode text into NVARCHAR field (SQL
: SERVER 2005 EXPRESS):
:
: DataRow row;
: row = cData.DatTable.Rows[i];
:
: row.BeginEdit();
:
: row["CompanyName"] = txtCompanyName.Text;
: //...
:
: row.EndEdit();
:
: cData.DatAdaptor.Update(cData.DatSet, TableSelect);
: cData.DatSet.AcceptChanges();

:
: When I input some unicode text into txtCompanyName,
: it is save SQL SERVER like that: "B?n ph?i nang d?ng"
:
: How can I solve this problem?
: Thanks for reading!


Did you specify the column data type in your code? And if so, what is it?



Brad Wang
.NET Freelancer from China



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.