关于Access数据库操作符丢失的严重问题
string Category=this.cbCategory.SelectedValue.ToString();string Time="#"+this.txtTime.Text+"#";
string Data=this.txtData.Text;
string Mood=this.cbMood.SelectedValue.ToString();
string Weather=this.cbWeather.SelectedValue.ToString();
string Content=formatString(this.txtContent.Text);
db=new DB();
db.InsertInto(Category,Time,Data,Weather,Mood,Content);
}
/// <summary>
/// 格式化txtContent内容
/// </summary>
/// <param name="str"></param>
/// <returns></returns>
private string formatString(string str)
{
str=str.Trim();
str=str.Replace(" "," ");//处理空格
str=str.Replace("<","<");//处理小于号
str=str.Replace(">",">");//处理大于号
str=str.Replace("\n","<br>");//处理换行
return str;
}
当我往Access数据库 插入Content的时候提示语法错误操作符丢
怎么会这样呢
补充:.NET技术 , C#