如下,为什么一直说我的Data Type unmatch?

string connStr = "Provider=Microsoft.ACE.OLEDB.12.0;" + "Data Source = System.accdb;";
OleDbConnection connect1 = new OleDbConnection(connStr);
string strSQL1;
strSQL1 = "update Point_card set [Status] = 'suspend' where Card_id = 'Convert.ToInt32(txtSuspend.Text) ';";
OleDbCommand sql2 = new OleDbCommand(strSQL1);
sql2.Connection = connect1;
connect1.Open();
sql2.ExecuteNonQuery();
connect1.Close();
MessageBox.Show("Point card suspend successful");
DATABASE: status = 文字
Card_id = 数字

达令说
浏览 122回答 1
1回答

慕少森

strSQL1 = "update Point_card set [Status] = 'suspend' where Card_id =" + txtSuspend.Text;
打开App,查看更多内容
随时随地看视频慕课网APP