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 = 數(shù)字
1 回答

慕少森
TA貢獻(xiàn)2019條經(jīng)驗(yàn) 獲得超9個(gè)贊
strSQL1 = "update Point_card set [Status] = 'suspend' where Card_id =" + txtSuspend.Text; |
- 1 回答
- 0 關(guān)注
- 139 瀏覽
添加回答
舉報(bào)
0/150
提交
取消