Using Advantage data access provider with UniDAC in Delphi

This article provides a brief overview of the Advantage data access provider for UniDAC used to establish a connection to Advantage from Delphi and Lazarus. You will find the description of some useful features and how to get started quickly.


Advantage provider is based on the ODBC provider. It uses Advantage ODBC driver to work with database. Main features of Advantage data access provider are:

The full list of Advantage provider features can be found on the UniDAC features page.

Both Professional and Standard Editions of UniDAC include the Advantage provider. Express Edition of UniDAC does not include the Advantage provider.


To learn the supported versions of Advantage Database Server, refer to the Compatibility section.


Applications that use the Advantage provider require the following components to be installed on the client computer:


When an application was built without runtime packages (Link with runtime packages set to False in Project Options), you do not need to deploy any BPL files with it. For more information, see Deployment.
Note that UniDAC Trial requires deployment of additional BPL files regardless of Link with runtime packages.

Advantage-specific options


Option name Description
DefaultType Specifies the type of database files to be used.

Supported values:

dtAdvantage (default)
Specifies that proprietary ADT tables with ADI index and ADM memo file formats will be used.

Specifies that FoxPro-compatible DBF tables with CDX index and FPT memo file formats will be used.

Specifies that Visual FoxPro-compatible DBF tables with CDX index and FPT memo file formats will be used.

Specifies that CA-Clipper-compatible DBF tables with NTX index and DBT memo fields will be used.

If set to True, the option enables Column-Wise Binding mode. The fefault value is False.

Note: Row-Wise Binding mode is enabled by default. However, some ODBC drivers don't support this mode. In such case, set the ColumnWiseBinding option to True.

ConnectionTimeout The time to wait for a connection to open before raising an exception.
ServerTypes Specifies the Advantage server types, to which connections should be attempted. Valid values include ADS, ALS, and AIS.
ADL - Remote , ALS - local, and AIS - Internet Servers.
These values can be logically OR'ed together with the "," in order to choose multiple server types. If multiple types are specified and multiple server types are available, the order of precedence is ADS first, AIS second, and ALS last.
UseUnicode Enables or disables Unicode support. Affects character data fetched from the server. When set to True, all character data is stored as WideStrings, and TStringField is replaced by TWideStringFiled.


Option name Description
CommandTimeout The time to wait for a statement to be executed.

TUniQuery, TUniTable, TUniStoredProc

Option name Description
CommandTimeout The time to wait for a statement to be executed.
ExtendedFieldsInfo If True, an additional query is performed to get information about returned fields and tables they belong to. The default value is True.
FetchAll If True, all records of a query are requested from database server when the dataset is being opened.
If False, records are retrieved when a data-aware component or a program requests it. The default value is False.


The TUniDump component has no Advantage-specific options.


The TUniLoader component has no Advantage-specific options.


The TUniDump component has no Advantage-specific options.

Data Type Mapping

The following table lists the constants for mapping Advantage Database Server data types to Delphi data types. See Data Type Mapping for more information.

Constant Description
adsCharacter Maps to Delphi data types.
adsNChar Maps NChar to Delphi data types.
adsVarChar Maps Varchar to Delphi data types.
adsNVarChar Maps NVarChar to Delphi data types.
adsShortInteger Maps Short to Delphi data types.
adsInteger Maps Integer to Delphi data types.
adsNumeric Maps Numeric to Delphi data types.
adsDouble Maps Double to Delphi data types.
adsMoney Maps Money to Delphi data types.
adsDate Maps Date to Delphi data types.
adsTime Maps Time to Delphi data types.
adsTimeStamp Maps TimeStamp to Delphi data types.
adsLogical Maps Logical to Delphi data types.
adsBinary Maps Binary to Delphi data types.
adsVarBinary Maps VarBinary to Delphi data types.
adsImage Maps Image to Delphi data types.
adsMemo Maps Memo to Delphi data types.
adsNMemo Maps NMemo to Delphi data types.
© 1997-2022 Devart. All Rights Reserved. Request Support DAC Forum Provide Feedback