ac# プログラムを使用して漢字などの Unicode 文字を SQL Server 2012 データベースに挿入しています。
挿入しようとしている列は ですがnvarchar
、まだ ??????? になっています。正しい文字の代わりに。Twitter からツイートを取得し、データベースに挿入しています。
SQL Server 2012 Express を使用しています。言語パッケージをインストールするか、設定を変更する必要がありますか? 私は SQL Server にあまり詳しくありません。
これは、C#を使用してコードをデータベースに挿入する方法です:
String command4 = "INSERT INTO tweets ([username], [createdDate], [tweet]) Values ('" + item.user.screen_name + "' , '" + item.created_at + "' ,N'" + escapedString + "')";
SqlCommand insertTweet = new SqlCommand(command4, connectionstring);
insertTweet.ExecuteNonQuery();
ありがとうございました!