【发布时间】:2011-12-21 15:27:18
【问题描述】:
我想保存在我的数据库 unicode 字符串中
即下文“内容”。我该怎么做?
using (DbCommand objCMD = objDB.GetStoredProcCommand("usp_InsertMessage"))
{
objDB.AddInParameter(objCMD, "@Author", DbType.String, msg.Author);
objDB.AddInParameter(objCMD, "@Email", DbType.String, msg.Email);
objDB.AddInParameter(objCMD, "@Content", DbType.String, msg.Content);
objDB.AddInParameter(objCMD, "@Guid", DbType.Guid, msg.Guid);
try
{
objDB.ExecuteNonQuery(objCMD);
}
【问题讨论】:
标签: c# sql-server unicode