Subject RE: [IBO] TIBOTable.Locate issue
Author IBO Support List
Mason,

I'd like to get this resolved. There is something unique to your situation I
doubt that I can discover on my own. Will you please help me to duplicate
this issue?

Thanks,
Jason

-----Original Message-----
From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf
Of masonwheeler
Sent: Saturday, April 13, 2013 10:41 PM
To: IBObjects@yahoogroups.com
Subject: [IBO] TIBOTable.Locate issue

I've got a TIBOTable mapped to a DB table with 240 rows. I've got a routine
that iterates over a second table that has a FK to the first table, and
calls Locate on the FK value to do some processing. The FK relationship
ensures that the row will be there. For ID values from 1 to 135, it works,
but above 135, Locate returns False.

Looking into the code, it appears that the internal dataset has a list of
buffer nodes, and it loads the first 135 of them (why i35? That's a very
arbitrary number) and if Locate doesn't ask for a value that can be found in
this node list, it does not check to see if its node count <
self.RecordCount and fetch more from the server.

Calling Last on the TIBOTable before starting the iteration works as a
workaround, presumably because it forces it to load more data. Not sure how
much more it makes it load, and if this would simply cause a gap to start
showing up once the table in question has more than 270 rows.

Mason



------------------------------------

___________________________________________________________________________
IB Objects - direct, complete, custom connectivity to Firebird or InterBase
without the need for BDE, ODBC or any other layer.
___________________________________________________________________________
http://www.ibobjects.com - your IBO community resource for Tech Info papers,
keyword-searchable FAQ, community code contributions and more !
Yahoo! Groups Links