c#中怎样修改access中某一项的数据 20
我的代码如下:stringstrConnection="Provider=Microsoft.ACE.OLEDB.12.0;";strConnection+=@"Data...
我的代码如下:
string strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;";
strConnection += @"Data Source=DB_WMS.accdb;";
strConnection += "Persist Security Info=False";
OleDbConnection MyConnection = new OleDbConnection(strConnection);
MyConnection.Open();
String title= (string)dgvLog.Rows[clcPos].Cells[1].Value;
String str = @"update worklog set content='"+txtLog.Text+"' where title='"+title+"'";
OleDbCommand MyCommand = new OleDbCommand(str, MyConnection);
MyCommand.ExecuteNonQuery();
没有报错,但就是修改不了,怎么回事啊 展开
string strConnection = "Provider=Microsoft.ACE.OLEDB.12.0;";
strConnection += @"Data Source=DB_WMS.accdb;";
strConnection += "Persist Security Info=False";
OleDbConnection MyConnection = new OleDbConnection(strConnection);
MyConnection.Open();
String title= (string)dgvLog.Rows[clcPos].Cells[1].Value;
String str = @"update worklog set content='"+txtLog.Text+"' where title='"+title+"'";
OleDbCommand MyCommand = new OleDbCommand(str, MyConnection);
MyCommand.ExecuteNonQuery();
没有报错,但就是修改不了,怎么回事啊 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询