zoukankan      html  css  js  c++  java
  • 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  更新时间:

  • 相关阅读:
    最大子列和
    喷水装置
    某种排序
    三个水杯
    奇偶数分离
    ASCII码排序(未完)
    1002
    if语句
    6.7
    A+B问题 涉及EOF
  • 原文地址:https://www.cnblogs.com/guorongtao/p/13803410.html
Copyright © 2011-2022 走看看