标准表达式中数据类型不匹配.
publicintupdate(Modelmodel,intcno){stringCstr=ConfigurationManager.ConnectionStrings[...
public int update(Model model, int cno)
{
string Cstr = ConfigurationManager.ConnectionStrings["ACCESSCONNECTION"].ToString();
using (OleDbConnection cnn = new OleDbConnection(Cstr))
{
cnn.Open();
string acc = "update Cultureinfo set Title='" + model.Title + "',Ctext='" + model.Text + "'where Cno='" + cno + "'";
OleDbCommand cmd = new OleDbCommand(acc , cnn);
OleDbDataAdapter adp = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
adp.Fill(ds,"cul"); 这句错误是。。。标准表达式中数据类型不匹配.
int ans = Convert.ToInt32(cmd.ExecuteNonQuery ());
return ans;
}
} 展开
{
string Cstr = ConfigurationManager.ConnectionStrings["ACCESSCONNECTION"].ToString();
using (OleDbConnection cnn = new OleDbConnection(Cstr))
{
cnn.Open();
string acc = "update Cultureinfo set Title='" + model.Title + "',Ctext='" + model.Text + "'where Cno='" + cno + "'";
OleDbCommand cmd = new OleDbCommand(acc , cnn);
OleDbDataAdapter adp = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
adp.Fill(ds,"cul"); 这句错误是。。。标准表达式中数据类型不匹配.
int ans = Convert.ToInt32(cmd.ExecuteNonQuery ());
return ans;
}
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询