我的程序在使用update users set userpassword='+''''+edit3.Text+''''+'where userID='+''''+edit1.Text+''''时,表中的数据能够根据设定改变,但Delphi会有一个错误提示“
CommandText does not return a result set."请问是什么原因?如何解决呢?
CommandText does not return a result set."请问是什么原因?如何解决呢?
调试欢乐多
1 把查询/执行结果传递给了TADOQuery或者TDataSet,比如adoqResult := Conn.Execute('...')
2 使用TADOQuery执行查询 adoqResult.SQL.Text := '...'; adoqResult.Open;
用AdoQuery.ExecSQL,不要用AdoQuery.Open;
补充点
open是返回数据集得
ExecSql是执行sql语句
update不存在返回数据集