Subject Re: [IBO] Re: RecordCount (for IBO v4) (or sooner if you like)
Author Jason Wharton
I am not calling it IsSequenced. IsSequenced is already in the TDataset
class and it is my job to override it. The new property will be called

IsSequenced has an effect on how TDBGrid behaves. Right now in IBO
IsSequenced is hard-coded to return true so that the grid will have the more
accurate vertical scrollbar. TQuery with the InterBase driver is set to
false and so you get the three position thing that doesn't give a very good
indication of where your record pointer is in the dataset. These two grid
behaviors hinge on the IsSequenced result. If the IsSequenced virtual method
returns true then TDBGrid directly accesses RecordCount.

But, in order to have the more preferable grid behavior I had to make the
RecordCount property avoid attempting to get the full record count since I
didn't want the users of the TDBGrid control to be flooding my support list
wondering why it was so slow. This forced me to use a different behavior for
the TDataset.RecordCount property. I tried to cover it up be redefining it
at the TIBODataset.RecordCount level but people still ran into problems as
they would hit it from both TDataset and TIBODataset and notice

So, what I am proposing to do here is make TIBOQuery more like TQuery in its
default state as well as make RecordCount always do the same thing. Then, I
will allow the more preferable behavior by flipping the RecordCountAccurate
property from true (default according to TQuery behavior) to false and if
the developer does this they will also know that they need to make sure
their code is adjusted if necessary to the change in behavior.

Also, setting AutoFetchAll will achieve the IsSequenced returning true
regardless of the RecordCountAccurate and for these datasets you will always
have the nice vertical scrollbar with TDBGrid.

I already have this done in v4 and what I am wondering now is if you would
like this in v3.6 or not.

Hope this clears things up a bit more.

Jason Wharton
CPS - Mesa AZ

----- Original Message -----
From: <paulhope@...>
To: <>
Sent: Saturday, December 02, 2000 4:23 AM
Subject: [IBO] Re: RecordCount (for IBO v4) (or sooner if you like)

> --- In, "Jason Wharton" <jwharton@i...> wrote:
> > Here is what I would like to do about record count. Sorry if this
> is a
> > little rambly.
> >
> >.. major snip..
> >
> > function TDataSet.IsSequenced: Boolean;
> .
> > .. more snip
> Just a small point - the idea of an option of obtaining a meaningful
> recordcount is great - but can't we think of a more obviosly named
> property to control it than 'IsSequenced' like 'ServerRecordCount' or
> something?
> Regards
> Paul