Subject Re: [IBO] TIBOQuery AfterScroll + recordCount problem (not BDE)
Author Jason Wharton
I think you could have your finger on a legitimate bug with regard to the
record count issue. I will take the information you have provided and see
what I can figure out. As for the AfterScroll event firing, I have pretty
much allowed the TDataset class to do whatever it needs to do. This is a
behavior that this class should be governing at the abstract level. I may
need to comb through the DBTables unit to see if there is some special code
to produce the extra scroll events or if perhaps I am doing something to
suppress them by mistake.

Although you may do well to be a little more explicit in your app coding
style I hold the ideal that I don't want you to have to fuss any more than
you have to when converting a BDE app. I will take an interest in any
behavioral difference and insure that I am introducing as few quirky
differences as possible.

Jason Wharton
CPS - Mesa AZ

----- Original Message -----
From: "William Hill" <william@...>
To: <>
Sent: Tuesday, November 28, 2000 7:34 PM
Subject: Re: [IBO] TIBOQuery AfterScroll + recordCount problem (not BDE)

> from the posts on 24/11/2000
> ----- Original Message -----
> > Sounds like I need to look into this.
> > I'll log it as a potential bug.
> >
> >----- Original Message -----
> >From: "William Hill" <william@...>
> >To: <>
> >Sent: Friday, November 24, 2000 6:08 AM
> >Subject: [IBO] TIBOQuery AfterScroll problem
> >
> >Greetings,
> >
> >I have just converted from BDE to IBO evaluation version 3.6 and am
> >a problem with TIBOQuery AfterScroll using master detail relationships.
> >
> >Under BDE when i scroll the master i get an AfterScroll event on the
> >query each time, under IBO i only get an AfterScroll event once when i
> > first open the detail query. Note the detail query will only select one
> > row at a time (master and detail are same table).
> >
> >Is this expected ?, I have code running in the AfterScroll event which
> >would be difficult to move elsewhere. All this is running on Win 98,
> >Delphi 5 professional and IB V6.1. Can anyone help me with this..
> >
> >Regards, William.
> Jason,
> Thank you for your interest in this matter. I have been doing some more
> testing and evaluation over the past few days and I am having other
> afterScroll and also recordCount problems where IBO does not
> give the same functionality as the BDE.
> I have multiple TIBOQuery components connected to DBGrids which use the
> afterScroll event to update Label captions indicating information about
> current row to the user. I use this technique extensively throughout my
> application and so it is very important to me. Under the BDE when I open
> or scroll a TQuery an afterScroll event is fired. I then test the passed
> TDataSet object using the .isEmpty method to see if any rows are available
> and from this I can clear the labels or update from the data in the
> row. I notice that if I open a TIBOQuery which has an empty result
> set the afterScroll event does not fire ?, so my user interface is broken
> (the Label captions contain information from the previous afterScroll
> event).
> I also use recordCount extensively, my users like to know how many records
> there are and they are used to accurate information. I use a parameterized
> TIBOQuery with >= :startstamp and <= :finishstamp input parameters.
> The first time I open the query the recordCount is correct, but if I close
> the query, change the parameter values and reopen the query the
> recordCount stays the same ?. Experimentation gives me a correct
> recordCount each time I change the parameters if I unprepare
> and then prepare the IBOQuery (very inefficient) or if I use the IBOQuery.
> InvalidateSQL method. (I noticed two gentlemen from Denmark discussing
> the recordCount problem earlier this evening, this may help them).
> I have recently upgraded from Interbase 5 to IB V6.1 (SQLDialect 1) and I
> wish to leverage maximum functionality and performance from this
> implementation. The application I am converting is too large and
> complicated for a straight BDE -> IBO BDE replacement -> pure IBO
> conversion.
> Although converting to IB Objects has fixed some nasty problems
> (which could not be fixed under the BDE) I now find myself confounded once
> again.
> Of course, it is possible that I am using poor coding style, or I
> misunderstand the correct usage of the IBO functionality.
> If this is so please correct me immediately, but I need to get
> away from the BDE with the minimum fuss as possible.
> If I can provide further evidence or examples to support these problems
> please do not hesitate to let me know as I am prepared to do my very best
> to resolve them.
> Environment notes:-
> IBO evaluation version 3.6
> InterBase (Fire Bird) 6.1
> Delphi 5 Professional
> Win 98
> Very best regards
> William.