Connect to Advantage Database Server (FireDAC)
Go Up to Database Connectivity (FireDAC)
This topic describes how to connect to Advantage Database Server.
Contents
Supported Versions
The FireDAC native driver supports the Advantage Database Server v 8.0 or later.
Client Software
Windows Client Software
FireDAC requires the ACE32.DLL x86 or ACE64.DLL x64 client library (Advantage Client Engine API) in order to connect to the Advantage server or to make a local connection. Ideally, the version should be equal to the server version. The full set of the v 10.0 client files:
- ace32.dll
- adsloc32.dll
- aicu32.dll
- axcws32.dll
- adscollate.adm
- adscollate.adt
- ansi.chr
- extend.chr
- icudt40l.dat
- adslocal.cfg
You can download the Advantage Client Engine API from here. The installation folder includes the "Redistribute" folder, containing all required redistributable files. You can put the files in:
- a folder listed in your PATH environment variable.
- your application EXE folder.
- any other folder and specify in FDDrivers.ini:
[ADS]
VendorLib=<folder>\ace32.dll
If the ADS client library has not been installed properly, an exception is raised when you try to connect:
[FireDAC][Phys][ADS]-314. Cannot load vendor library [ACE32.dll]. The specified module could not be found. Make sure it is located in one of the PATH directories or in the application EXE directory
Linux Client Software
Download the Advantage Client Engine for Linux and run the following commands in the download folder:
tar -xavf aceapi-*.tar.*
cd aceapi-*
sudo ./setup.pl
Driver Linkage
To link the Advantage driver:
- Drop a TFDPhysADSDriverLink component from the "FireDAC Links" palette page.
- Or include the FireDAC.Phys.ADS unit in a uses clause.
Connection Definition Parameters
Tip: For information on how to access the connection definition parameters, see Defining Connection (FireDAC).
DriverID=ADS
Parameter | Description | Example value |
---|---|---|
ServerTypes |
A sum of values indicating the types of Advantage Servers to which connections are attempted. The values for the servers are:
Instead of numbers, you can use the following keywords:
You can concatenate several types with '|'. The default depends on the Server and Database values:
|
For example, to allow the Driver to use the remote or local server, but not the Advantage Internet Server, use: ServerTypes=3 (1+2). |
Protocol |
Specifies the communication protocol used to connect to the Advantage Database Server:
|
TCPIP |
Server | The server address. | \\ADS |
Port | The server port. | 6262 |
Database | The fully qualified path to the computer where the data files exist and the default location of the data files. This fully qualified path must contain a drive letter or use UNC. Database may include Server and Port values. For remote server types, the path must either use UNC or refer to the existing network share.
For "free connections", it should be a valid path name to where the data files are located (for example, x:\data). This path is used to automatically select all tables in the specified directory. For "database connections", it should be a valid path name including the Advantage Data Dictionary file name (for example, x:\database\mydictionary.add). A path can include path variables. |
c:\ads\data
\\ADS:6262\DB |
Alias | Specifies the alias to be used when connecting to the database server. The file path associated with the specified alias is used as the database directory. The table type associated with the alias is set as the default table type to be used with this connection. For a full description of Alias, see Database Aliases and the ads.ini File. | |
CharacterSet | An optional collation language used when opening tables. | ANSI |
Compress |
Specifies the option for communications compression. The valid values are:
|
Internet |
TableType |
Sets the type of database files to use:
This setting is ignored for database connections. |
ADT |
TablePassword | Specifies the encryption password for all tables in the connection. Applicable to free connections only.
You can specify the password in two different formats:
|
1) EMPLOYEES=pwd1;CUSTOMERS=pwd2
2) pwd |
Locking |
Specifies the locking mode to be used when opening DBF tables. The valid values include:
|
Proprietary |
ADSAdvanced | Allows you to specify any other additional ACE API AdsConnect101 connection parameter value. | EncryptDictionary=True;DDPassword=qwe |
Use Cases
Open local ADS database in "free connection" mode:
DriverID=ADS Database=c:\ads\data
Open local ADS database in "free connection" mode with Visual FoxPro tables:
DriverID=ADS Database=c:\ads\data TableType=VFP
Open a remote data dictionary based connection:
DriverID=ADS ServerTypes=Remote Protocol=TCPIP Database=\\DA\ADS_DB\addemo.add User_Name=adssys Password=a
Open local ADS database in "free connection" mode using an alias:
DriverID=ADS Alias=MyConn
And the ads.ini content:
[Databases] MyConn=c:\data;N
Known Issues
- The pessimistic locking is still not supported due to Advantage limitations. Concretely, there is an incompatibility issue with navigational and SQL locks.
Troubleshooting
If you get "Error 6060: Advantage Database Server not available on specified server", try to add the port number (6262 by default) to the Server
parameter value. For example: Server=example.com:6262
.