Subject RE: [IBO] TIBOTable.Locate on a lookup field fails
Author IBO Support List
To support this I will have to make the SQL parsing engine put an underlying
column so that it will be supported. This could take me a little while to
implement this.

Alternatively, I could have it detect this and then just do a scan of
records in the buffer to try and find a match. But, that wouldn't reap the
benefit of the SQL parsing engine to optimize the Locate() on the server if
possible. It would just be a simple record scan on the client.


-----Original Message-----
From: [] On Behalf
Of masonwheeler
Sent: Thursday, April 18, 2013 11:45 PM
Subject: [IBO] TIBOTable.Locate on a lookup field fails

Got another fun one for you.

Create two database tables, linked by a FK relationship.

Create two TIBOTable objects, one for each table.

Use the form designer to create persistent fields for one of the TIBOTable
datasets. Give it the fields the underlying table has, plus one more, a
field of FieldKind fkLookup, that looks up a property on the other dataset,
using the FK relationship.

Create a routine that tries to call Locate on this dataset, and use the
lookup field for the Locate key field.

Expected: It should work. This will work on normal datasets.

Observed: EIB_StatementError. FieldName: [lookup field name] not found.

It appears to be looking for the field in the underlying dataset, and then
bailing when it's not found.



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