Longit644
Longit644

Reputation: 43

Save unicode character with linq to SQL

I try to save some uincode character to Sql via linq in flow code:

 DataClasses1DataContext db = new DataClasses1DataContext();
 Album a = new Album();
 a.ID = "ALB00100";
 a.ArtistID = "ART00007";
 a.Title = "英语翻唱";
 db.Albums.InsertOnSubmit(a);
 db.SubmitChanges();

but in SQL column Title is "?????" I use type nvarchar(150) for this column

Upvotes: 2

Views: 2015

Answers (1)

Robert McKee
Robert McKee

Reputation: 21487

Update your .dbml file as it was likely initially generated with the column being varchar instead of nvarchar.

Upvotes: 2

Related Questions