代码
Ado_mon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=stock.mdb;Persist Security Info=False"
sqltxt3 = "SELECT T_t_in.date, T_t_in.id, T_t_in.y_id, T_t_in.p_name, T_t_in.t_id, T_t_id.t_name, T_t_id.model, T_t_in.num FROM T_t_in INNER JOIN T_t_id ON T_t_in.t_id = T_t_id.t_id where id='" & Tx_id.Text & "'"
Ado_mon.RecordSource = sqltxt3
Ado_mon.Recordset.Delete
Ado_mon.Recordset.Update提示错误“缺少更新或刷新的键列信息”
怎样可以只删除其中表“T_t_in”的相应记录呢,又对表“T_t_id”没影响?求一段代码
Ado_mon.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=stock.mdb;Persist Security Info=False"
sqltxt3 = "SELECT T_t_in.date, T_t_in.id, T_t_in.y_id, T_t_in.p_name, T_t_in.t_id, T_t_id.t_name, T_t_id.model, T_t_in.num FROM T_t_in INNER JOIN T_t_id ON T_t_in.t_id = T_t_id.t_id where id='" & Tx_id.Text & "'"
Ado_mon.RecordSource = sqltxt3
Ado_mon.Recordset.Delete
Ado_mon.Recordset.Update提示错误“缺少更新或刷新的键列信息”
怎样可以只删除其中表“T_t_in”的相应记录呢,又对表“T_t_id”没影响?求一段代码
无聊的事到此为止,请你自重!
引用了两个表是不能更新的,在SQL SERVER中只能用触发器更新其中一个表.
在ACCESS中,楼主可以考虑删除时执行一个Delete操作,ADODC再重新刷新一次数据.
将Ado_mon.Recordset.Delete
Ado_mon.Recordset.Update改成ADO_mon.recordset.activeconnection.execute "Delete T_t_in where id='" & ado_mon.recordset!id & "'"
ado_mon.refresh