Connecting Data Controls

IBO allows the same type of connectivity to its data bound controls as does the standard data controls.

Each control will have a DataSource property and a DataField property if applicable.

However, the controls that come with IBO are not compatible with the VCL's standard data controls. Native IBO controls may only be used with the native IBO data access components. These are the TIB_DataSource, TIB_Cursor, TIB_Query and TIB_StoredProc components.

Because the IBO controls are not compatible with the standard controls it was necessary to create a TIB_DataSource component that acts almost exactly like the VCL equivalent TDataSource. It references a TIB_Dataset which could be the TIB_Cursor or TIB_Query component.

If you wonder why this is the case, IBO was started long before Delphi 3 came out with the virtual dataset. So, the only way to build the functionality I needed in my applications and take advantage of the powerful features of InterBase was to write my own data access layer and controls built on top of the InterBase API and the TComponent, TWinControl, TCustomEdit, etc. classes.

Since Delphi 3 introduced the virtual TDataset class I have provided TIBODatabase, TIBOTable and TIBOQuery components to match up with the standard data access components and provide compatibility to all standard VCL controls too. This was accomplished by writing a sub-class layer to the TDataset virtual class and have it interface into an internal instance of a TIB_Query.

This gives IBO the ability to be used with report writers like Report Printer Pro, Quick Reports, etc. as well.

So, you have your choice of using the native IBO controls with the native IBO data access components or the standard VCL controls with the IBO TDataset based classes TIBOQuery and TIBOTable. And for the indecisive types feel free to mix them together in the same application and even using the same connection and transaction.

A few other items of notice is that I have also gone to the extent of providing a StatementSource, ConnectionSource and TransactionSource component. This is so that one can make forms or other controls statement, connection or transaction aware. This can be seen by looking at the TIB_StatementBar, TIB_ConnectionBar or TIB_TransactionBar controls.

Often times I will develop forms independant of a connection and transaction reference so that at run-time I can quickly assign a connection and transaction context to it by assigning a connection and transaction reference to the ConnectionSource or TransactionSource component on the form. Then in its AfterAssignment event I have code to replicate the reference to all the datasets on the form.