Subject | RE: Re[2]: [IBO] Getting validation source from a domain |
---|---|
Author | Jason L. Wharton |
Post date | 2006-10-19T06:51:45Z |
Carlos,
RecordCount will work with a TIB_Cursor component but it is inefficient
because it cannot know the record count by simply checking how many rows are
in the buffer. It parses together a totally new SQL and asks the server to
tell it what the count of records are for your query.
So, your application will work, it just may not be as efficient (good
performace) as it could otherwise be.
Jason Wharton
RecordCount will work with a TIB_Cursor component but it is inefficient
because it cannot know the record count by simply checking how many rows are
in the buffer. It parses together a totally new SQL and asks the server to
tell it what the count of records are for your query.
So, your application will work, it just may not be as efficient (good
performace) as it could otherwise be.
Jason Wharton
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
> Behalf Of Carlos Tré
> Sent: Wednesday, October 18, 2006 7:29 AM
> To: Helen Borrie
> Subject: Re[2]: [IBO] Getting validation source from a domain
>
> Helen,
>
> Wednesday, October 18, 2006, 10:10:35 AM, you wrote:
>
> >> result := lCursor.RecordCount > 0;
>
> > RecordCount is meaningless. An IB_Cursor doesn't know about it. It
> > has a single-row buffer.
>
> I've got tons of lines similar to
>
> [...]
> curCHTEbrw.First();
> CursorRows := curCHTEbrw.RecordCount;
> RowsCount := 0;
> while (
> (not curCHTEbrw.Eof)
> and
> (not AbortSQL)
> )
> do begin
> [...]
> curCHTEbrw.Next();
> RowsCount := RowsCount + 1;
> if ((RowsCount mod ProgStep)=0) then begin
> ProgressBar.Position := Round((RowsCount*100) / CursorRows);
> Application.ProcessMessages();
> end;
> [...]
> end;
> [...]
>
> and all of them work as intended, curCHTEbrw.RecordCount returning a value
> that reflects exactly the value RowsCount will have when EOF is reached.
> Has anything changed in this regard? Will this be a source for potential
> problems if I need to upgrade (currently Delphi 5 and IBO 4.2Ie)?
>
> Thanks in advance.
>
> --
> Best,
> Carlos