Skip to content

The Connector component

In order for your application to use the database for object storage, you must use a connector component. The connector acts as a gateway between your application and the database (by means of an internal component called the broker) and manages all the objects that are stored to and retrieved from the database. A connector component for each type of data access layer that has been installed from InstantObjects is available on the component palette. A connector is attached to a database by assigning a connection component to its Connection (or equivalent) property. Each connector component supports its own connection type.

Available Connectors and Brokers

InstantObjects supports a variety of databases and data-access technologies by means of packages called Brokers. You can build and install the broker(s) you need from the Brokers sub-folder of InstantObjects's Source folder.

SQL-based brokers offer better performance and additional features like external storage, optimized queries, and statement caching:

TypeConnectorConnectionDescription
FireDACTInstantFireDACConnectorTFDConnectionUniversal data access layer supporting multiple databases (InterBase, Firebird, MS SQL Server, MySQL, Oracle, PostgreSQL, SQLite, and more). Available from Delphi XE5+. Recommended for new projects.
ADOTInstantADOConnectorTADOConnectionMS Access (table-based) and MS SQL Server (SQL-based) through ADO/OLEDB.
IBXTInstantIBXConnectorTIBDatabaseInterBase and Firebird using IBX components (included with Delphi).
DBXTInstantDBXConnectorTSQLConnectiondbExpress support for multiple databases (InterBase, MS SQL Server, MySQL, Oracle, DB2).

File-based and Lightweight Brokers

TypeConnectorConnectionDescription
XMLTInstantXMLConnectorTXMLFilesAccessorLightweight XML file-based storage. Each object is stored as a separate XML file. Ideal for small datasets and prototyping.
JSONTInstantJSONConnectorTJSONFilesAccessorModern JSON file-based storage with optional Neon serialization support. Each object stored as JSON file. Excellent for REST integration and data interchange. See JSON Broker for details.

Legacy Dataset-based Brokers

Dataset-based brokers use navigational access and have some limitations compared to SQL-based brokers:

TypeConnectorConnectionDescription
BDETInstantBDEConnectorTDatabaseBorland Database Engine. Legacy technology, not recommended for new projects.

Catalog Dependencies

Some SQL brokers require separate catalog packages for database-specific type mapping:

BrokerRequired Catalog(s)
IBXIBFb Catalog
DBXIBFb, MSSql, MySQL Catalogs (depending on target database)
ADOMSSql Catalog
FireDACIBFb, MSSql, MySQL Catalogs (depending on target database)

Using Connectors

Drop an appropriate connector component and a matching connection component on a form or a data module in your project:

  1. Configure the connection component to access the database
  2. Assign the connection to the connector's Connection property
  3. Set the connector's IsDefault property to True to make it the default for your application
  4. Optionally configure broker-specific properties (e.g., UseUnicode, UseTransactions)

Connection Manager

You can also use a TInstantConnectionManager component that stores connection data in external files (.con or .xml format) and can create connectors and connections automatically based on this data. This is particularly useful when you don't want to hard code a particular broker or set of brokers into your program. The Connection Manager allows:

  • Multiple connection profiles
  • Runtime broker selection
  • Database building and evolution tools
  • Connection pooling and management

See the Primer Demo application for an example of this technique.

Choosing the Right Broker

For new projects:

  • Use FireDAC for maximum flexibility and database support
  • Use JSON for file-based storage, REST services, or data interchange
  • Use IBX for InterBase/Firebird-only projects

For existing projects:

  • Continue using your current broker unless you need features only available in SQL-based brokers
  • Consider migrating to FireDAC for improved performance and features

Released under Mozilla License, Version 2.0.