F
forgot2000
Unregistered / Unconfirmed
GUEST, unregistred user!
当我写
AdoCommand1.text=edit1.text;
Adodataset1.recordset:=Adocommand1.Execute;时,如果我在编辑框输入的是
"Select * from table1",则不会出错,但如果输入的是"Update table1 set id=0"
则会出错,说recordset没有打开,想写成这种形式:
if (...) then
Adodataset1.recordset:=Adocommand1.Execute
else
Adocommand1.Execute;
应该怎么做?
AdoCommand1.text=edit1.text;
Adodataset1.recordset:=Adocommand1.Execute;时,如果我在编辑框输入的是
"Select * from table1",则不会出错,但如果输入的是"Update table1 set id=0"
则会出错,说recordset没有打开,想写成这种形式:
if (...) then
Adodataset1.recordset:=Adocommand1.Execute
else
Adocommand1.Execute;
应该怎么做?