Discussion:
Locate and AfterScroll
(too old to reply)
Eric ten Westenend
2008-05-06 17:56:23 UTC
Permalink
Hi

I'm opening a dataset with 100 records.
In the AfterOpen i try to locate a certain record,

It looks like a scan is done through the table because a afterscroll event
is called for every record found before the record i'm searching for is
found.

I did not expect this.

Using IBX 11,11 on Ib2007

Eric
Craig Stuntz [TeamB]
2008-05-06 18:04:26 UTC
Permalink
Post by Eric ten Westenend
I did not expect this.
Expectations are easy to fix. :)
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Please read and follow Borland's rules for the user of their
server: http://support.borland.com/entry.jspa?externalID=293
Bill Todd [TeamB]
2008-05-06 21:05:52 UTC
Permalink
Post by Eric ten Westenend
I did not expect this.
How else can you locate a record in a query result set? Reading the
records sequentially is the only way. If you do not want to iterate
through the records and have AfterScroll fire you need to put the
locate criteria in the WHERE clause of a SELECT and let the server do
the searching.
--
Bill Todd (TeamB)
Robin Martain
2008-05-12 07:24:41 UTC
Permalink
Post by Eric ten Westenend
I'm opening a dataset with 100 records.
In the AfterOpen i try to locate a certain record,
It looks like a scan is done through the table because a afterscroll
event is called for every record found before the record i'm
searching for is found.
Hi Eric,

As has been mentioned, this is exactly the eay searches on result sets
are done, by design (and logical necessity).

How come you are returning a result set and then searching for a record
after that? This is normally something you would do in the WHERE or
HAVING clause and thus only return the result set which matches your
parameters.

Maybe you could tell us what exactly you are trying to do?
--
Robin
www.bridalbuzz.com.au
Loading...