Q
qiluzhizi
Unregistered / Unconfirmed
GUEST, unregistred user!
sqlquery := 'update XT_SJJHJH set CZXK='+''''+ls_czxk+''''+',QDSJ='+''''+ls_qdsj+''''+',XCYXSJ='+''''+datetimetostr(ldt_xcyxsj)+''''+',SM='+''''+ls_sm+''''+' where ID='+''''+ls_id+'''';
loginform.SQLClientDataSet1.Close;
loginform.SQLClientDataSet1.CommandType:=ctquery;
loginform.SQLClientDataSet1.CommandText:=sqlquery;
loginform.SQLClientDataSet1.Execute;
loginform.SQLClientDataSet1.open;
loginform.SQLClientDataSet1.ApplyUpdates(-1);
我的源代码是这样的,其中
loginform.SQLClientDataSet1.open;
可以换成loginform.SQLClientDataSet1.Active:=true;
但是如果没有open或者active:=true而只有
loginform.SQLClientDataSet1.Execute;
修改不成功,
如果loginform.SQLClientDataSet1.Execute;和
loginform.SQLClientDataSet1.open;同时有的话,修改成功,
但是出现错误
loginform.SQLClientDataSet1.Close;
loginform.SQLClientDataSet1.CommandType:=ctquery;
loginform.SQLClientDataSet1.CommandText:=sqlquery;
loginform.SQLClientDataSet1.Execute;
loginform.SQLClientDataSet1.open;
loginform.SQLClientDataSet1.ApplyUpdates(-1);
我的源代码是这样的,其中
loginform.SQLClientDataSet1.open;
可以换成loginform.SQLClientDataSet1.Active:=true;
但是如果没有open或者active:=true而只有
loginform.SQLClientDataSet1.Execute;
修改不成功,
如果loginform.SQLClientDataSet1.Execute;和
loginform.SQLClientDataSet1.open;同时有的话,修改成功,
但是出现错误