Delphi ADOQuery错误:ADOQuery1:commandtext does not return a result set
Delphi ADOQuery错误:ADOQuery1:commandtext does not return a result set
错误描述:commandtext 不能返回结果集
原因分析:SQL 执行Delete、insert、update 无返回值,故不能用open
sSQL:='exec 存储过程';
with ADOQuery do begin
Close;
SQL.Clear;
SQL.Add(sSQL);
//open; //执行insert 和 update 无返回值,故不能用open,否则报错:commandtext does not return a result set
ExecSQL;
end;
解决方法:用 ExecSQL; 后再获取参数返回值
创建时间:2020.10.12 更新时间:
博客园 滔Roy https://www.cnblogs.com/guorongtao 希望内容对你有所帮助,谢谢!