with ADOQuery1 do
begin
close;
SQL.Clear;
SqL.Add('select * from mytable where id=:q;');
Parameters.ParamByName('q').Value :='22';
i:=adoquery1.RecordCount;
execSQL;
end;
showmessage('搜到'+inttostr(i)+'条数据');错误信息为adoquery1:cannot perform this operation on a closed dataset。我知道这句话的大体意思是数据集已关闭。但是如何修正这段代码呢 ???谢谢啊。
begin
close;
SQL.Clear;
SqL.Add('select * from mytable where id=:q;');
Parameters.ParamByName('q').Value :='22';
i:=adoquery1.RecordCount;
execSQL;
end;
showmessage('搜到'+inttostr(i)+'条数据');错误信息为adoquery1:cannot perform this operation on a closed dataset。我知道这句话的大体意思是数据集已关闭。但是如何修正这段代码呢 ???谢谢啊。
解决方案 »
- 莫名其妙的问题
- 入群,聊天。4372026
- 有没有办法可以看到资源文件.res的内容???
- format格式化字符串的问题
- 100分求:那里有台湾钱达智先生《delphi学习笔记》完整版本下载?
- 在Web Service中传递图像字段数据回客户端的问题!请教大侠!
- 控件问题
- 请问: 我目前用的是 XLSReadWriteII V 2.0 版 可遇到 OFFICE 2003 版本就会出错,不知大家会有这样的错误吗?
- 有事请教(急)!!
- 更正,no visual c,delphi it is,和速达2000几乎完全一样的表单录入控件!!
- D2007可否正常使用TRegExpr呢
- delphi 单击按钮弹出对话框:请输入姓名 这个怎么实现?
with ADOQuery1 do
begin
close;
SQL.Clear;
SqL.Add('select * from mytable where id=:q;');
Parameters.ParamByName('q').Value :='22';
execSQL;
i:=adoquery1.RecordCount;
end;
没有执行那个哪来的数据?
i:=adoquery1.RecordCount;