解决 ADOQuery1:commandtext does not return a result set

ADOQuery错误:ADOQuery1:commandtext does not return a result set
这个问题困扰我好久啊,终于解决了!

因为你的语法使用到 DELETE OR UPDATE ,而他们的执行结果是不回传的,所以就出现了以下警告:

程序内容:
ADOQuery1.Close;
ADOQuery1.SQL.Clear;
ADOQuery1.SQL.Add(sqlstr);
ADOQuery1.Open;
解决方法:
ADOQuery1.Open;此代码改为 ADOQuery1.ExecSQL;
运行!

你可能感兴趣的:(解决 ADOQuery1:commandtext does not return a result set)