我用下面的代码来计算查询到的记录,现在出现了一个好奇怪的问题,当查询到的记录少8条(包括8条)能够显示出查询到的记录数但数据量在大于时rc的值为-1,我在别的地方这么用不会出现这种问题请各位大虾帮我看看就什么问题.
procedure TfrmResponse.QueryMobileResponseAfterOpen(DataSet: TDataSet);
var
rc : Integer; //计算查询到的记录数
begin rc := QueryMobileResponse.RecordCount;
//记录查询到的数据
If rc < 0 then rc := 0; gbInfo.Caption := gbInfo.Caption + ':' +
inttostr(rc);end;
procedure TfrmResponse.QueryMobileResponseAfterOpen(DataSet: TDataSet);
var
rc : Integer; //计算查询到的记录数
begin rc := QueryMobileResponse.RecordCount;
//记录查询到的数据
If rc < 0 then rc := 0; gbInfo.Caption := gbInfo.Caption + ':' +
inttostr(rc);end;
解决方案 »
- 为庆祝D2010发布,留贴给第一个发可下载用的正式发布版本的同志!
- 用过RzGruopBar的朋友帮个忙,怎样在RzGroup上显示图标或是图片(有图),谢谢!
- 急--请问如何判断客户电脑上安装的Windows Media Player播放器的版本?还有RealPlayer版本呢?
- 高分求TRxTrayIcon,TNMUDP,TColorCombobox , TdxSideBar TRxTimerList ThotKeySpy 控件
- 一个很简单的问题!
- 请教在listview连同文件与该文件所对应的图标一起显示的问题。
- SQLserver2000的数据库问题!
- 如何将一个form保存为bmp?在线急等!!!
- Delphi中FileOpen等文件操作函数的问题
- 一个菜鸟问题。请各位指教?
- 有没有想比较好的Edit控件,当没有焦点时背景是灰色。获的焦点后就反白。
- 求助:用delphi怎样做IIS组件????
用query1adoquery1.RecordCount看一下
…………………………………
operation, especially for SQL queries that return large result sets. Generally, an application should only use RecordCount with Paradox and dBASE tables.Note: The number of rows indicated might be less than the total number of
…………………………
rows in a table. This can happen when the rows retrieved as a recordset for a dataset component are a conditional subset of the table.
From yourTable
Where 条件