Subject Re: [IBO] TIBOQuery Keylinks but no Keysource
Author Helen Borrie (TeamIBO)
At 01:45 PM 09-07-02 +0000, Danial Widner wrote:
>Essentially it boils down to TIBO datasets and by inheritance TIBO
>queries are not setting their datalinks properties properly with the
>native datasource components (or handling them).

You should be using the VCL's TDatasource, not IBO's native TIB_Datasource
(which has datalinking for the TIB_* data access components and the TIB_*

Your BDE app should work without changing any existing code. The one extra
thing you have to do when converting from BDE to TIBO* data access is to
add Keylinks. In this property, you list (one per line) the columns in
your dataset which go to make up the "primary key" of the dataset. In the
case of a simple query, these will be your table's PK columns. With joined
datasets (not updatable at all under the BDE) you have to think a bit
harder about the columns that form a unique key for the dataset.

Understand that the TIBO* data access components provide compatibility with
the Delphi VCL controls. Because of this, they are "crippled" by the same
things that cripple all the TDataset descendants. There is a lot of
functionality available in the TIB_* data access components that is not
available to the TDataset-compatible ones - and the Keysource/Lookup
relationship is one of those features that is available only to the fully
native IBO architecture.

It *is* possible to use TIBO* and TIB_* data access within the same
application but you CANNOT mix and match the datalinking. TIB_* components
won't link to native VCL data-aware controls and TIBO* components won't
link to the TIB_* data-aware controls.

In short, if you want your app to be exactly like your BDE app, don't try
to use TIB_* at all. If you want to incorporate native IBO things such as
TIB_Cursor and TIB_DSQL, by all means *add* them - they can link happily to
your TIBODatabase. Just don't try to link them to VCL controls.

>Not knowing the
>logic used in the TIBO code (and not needing to), I am not in a
>position to fix vendor supplied code. Those who work with the IBO
>internals and having time to do so could easily fix this to match
>the functionality provided in the BDE components and in the TIB

You are mistaken. With the TIBO* components (used properly) you don't have
to change anything - other than to add the Keylinks for the datasets. If
you have conventional queries, just set KeylinksAutodefine to true and you
don't even have to worry about it. Certain features of the native IBO
datasets are available (including GeneratorLinks and the xxxxSQL
properties) but many are not, because the architecture is totally different.

If you are planning to "go native", then you have some learning to do. The
extra power you get from escaping from the TDataset architecture is worth
the work...but there is nothing sensible about a proposition to drag the
native IBO data access down to mimic the outdated, fileserver-based,
limiting BDE architecture.

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