我用下面的代码来计算查询到的记录,现在出现了一个好奇怪的问题,当查询到的记录少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;
解决方案 »
- delphi interface单元调用
- insert into 只插入一条啊,什么原因??
- 新公司,新环境,有点不适应。
- SQL语句用变量居然无法连接?
- 未能执行所请求的操作,因为可用内存少于最小查询内存。请减小 'min memory per query' 服务器配置选项的配置值。
- 第二期:CSDN联盟榜--本期打榜者:aiirii(爱的眼睛)
- 求一个IOCP服务器/客户端实现文件传输 源码
- 如何定制报表?分数还可以考虑?急!急!急!
- 怎样不能过继承而改写CreateParam中的参数
- 请问如何判断一个文件在NMFTP控件是已经下载完,rm控件中播放完成?
- 有没有想比较好的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 条件