Subject Re: [IBO] Horizontal refinement in TIBOTable
Hi Helen,

That always confued me .. When I press for help on Keylink on
a TIBOQuery, I get
This property plays a very important role in the IB_Query component.

This property must contain the column(s) that define a unique identifier
for each row of the data on the server.

An IB_Query component maintains a permanent buffer of these key columns
that serve as the backbone of the dataset buffer. Then, on demand, the
remaining whole record buffer is selected in one at a time by internal
prepared cursors. By this means, scrolling to the end of a dataset only
requires fetching in all of the keys and then the last whole record

The BDE/VCL requires that the entire dataset be fetched in, which can
take a very long time. The key-driven functionality of IB Objects makes
it magnitudes more responsive than the BDE/VCL when browsing rows at

This property is also used in order to define an XBASE-style SET
RELATION relationship between two datasets. With this relationship
defined the following behavior can be observed:

Parent record scrolls: A seek for the new matching child record is
performed. First a check is done in the existing fetched records. If it
is found in the client's buffers, that record becomes the current record
in the child dataset. If it is not found there, a special SELECT
statement is formed for searching for it on the server. If it is found,
the key column values required for fetching it are returned.

With these keys, the columns of the IB_Query's key buffer are fetched
until a matching key is returned. Because only the key column(s) are
being fetched, not the entire row, it is very fast.

The special SELECT also takes any search criteria for the data set into
consideration, so as to fetch in just those keys which it is certain to
match eventually. Otherwise, non-matching parent data could exist,
causing child dataset to be set to Bof - yes, Bof and not Eof.


which seems to indicate a Master/Detail relationship :)

However, after some playing I found out that TIBO Master?detail
links are flexible.

Mast table A has fields A, B, C integer
Detail table B has fields X,Y.Z integer

Just set B.DataSource to table A.TDataSource
ParamCheck := True

and B.SQL = 'select * from table where X = :B for a M/D link
between B.X and A.B. It is the ':B' part what controls the link
and if the ':B' ':' stripped part matches in name a column name
from table A the M/D link is esstablished.
If use use B.SQL = 'select * from table where X = :BX, you get
no error message and there is no link. Actually very neat, my
complements to Jason :)

This brings up another point. A few times I've uploaded some
IB source code enhancements to be included in IBO, however
how do we upload documentation enhancements or corrections?

IMO, TIBO_ components lack documentation or bring up
incorrectly TIB documentation or just 'see xxx' and
xxx doesn't exist. Since a new user may want to experience
IB4 by first converting a small existing project, it might
convince the new user to stay on the IB4 track. Native TIB_
components do require way more understanding to do a simple
quick test.

Since most of my third pary software doesn't support native TIB_
components, I'm stuck with TIBO_. If I wish to use IB4, I face
a total rewrite, but i try a little bit at the time :)

The apperent interest of AOL in RedHat and comment how easy it is to
change their browser over, is sparking concern how portable my future
development have to be.

Best Regards


Helen Borrie (TeamIBO) wrote:
> At 09:37 PM 28-01-02 -0700, you wrote:
> >TIB_Query has a flexible Master/Detail relationship
> >via MasterLinks and MasterSource.
> >
> >TIBOQuery is appears to be missing this and Master/Detail
> >link parameters seem to come from whatever matches an
> >internal pool by the same fieldname used in the Query
> >for the detail as 'field = :field', regardless the
> >settings of Keylinks and then only when paramCheck is
> >set to True, else I get an internal paramater mismatch error.
> >
> >Trying to Master/Detail link two TIBOQueries say for
> >table A and B on Keylinks = B.Field1=A.Field2
> Hans,
> 1. Keylinks linking isn't for master-detail, it's for Keysource-Lookup relationships in the native IB_ datasets.
> 2. TIBOQuery uses TDatasource and so is stuck with its rather crippled way of linking detail queries to masters, through linking the detail's Datasource property to the master's TDatasource. There is no provision for specify the link columns - TDataset does it by matching column names alone.
> If it is able to match column names, the link will work as long as both columns are of identical data type; otherwise you will get a parameter type mismatch. :(
> regards,
> Helen Borrie (TeamIBO Support)
> ** Please don't email your support questions privately **
> Ask on the list and everyone benefits
> Don't forget the IB Objects online FAQ - link from any page at
> ___________________________________________________________________________
> 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 !
> Your use of Yahoo! Groups is subject to