Advantage ODBC Driver – Setup and Usage

Knowledgebase topic detail

The Advantage ODBC Driver is an ODBC Version 3 compliant driver based on the Advantage Client Engine which provides SQL access to the Advantage Database Server and Advantage Local Server. The driver provides full support for the Minimum ODBC SQL grammar specification, as well as most functions included in the Core and Extended grammar specifications. When used in combination with the Advantage Database Server, ODBC users can have the application stability, performance and reduced network traffic benefits of a client/server architecture.

Installation on Windows

Like other ODBC drivers, the Advantage ODBC Driver is installed and managed using the ODBC Administrator Utility. This utility works with the ODBC Driver Manager to configure ODBC Data sources. At runtime, the ODBC Driver Manager works with available drivers and their configured data sources.
If you have previously installed ODBC drivers, the ODBC Administrator may already be installed on your workstation. The icon for the Administrator is usually found in the Control Panel.

To install the Advantage ODBC Driver:

  1. Download the Advantage ODBC Driver Setup program corresponding to the version of your Advantage Database Server.
  2. Click on the downloaded file to start the Setup program.
  3. Click OK.
  4. Proceed through the setup windows to complete installation.

Notes :

– You may download the Advantage ODBC Driver installation program corresponding to the version of your Advantage Database Server from our website at:
http://www.pgs.fr/pgs/us/support/download.asp

– We advise against changing the default installation directory. In no way should you select a directory already containing PGS software to install in.

DataSource Setup for Windows

Once the Advantage ODBC Driver is installed, a Data Source needs to be configured to use the Advantage ODBC Driver. The Data Source is an entry in the Windows Registry. When a Data Source is defined for the Advantage Driver, all information specific to the Advantage Driver and database files is stored under the Data Source entry in the Windows 95/98/ME/NT/2000/XP Registry.
The database files and indexes must be stored on your file server, and the Advantage Database Server must be loaded in order to access the files.

The Data Source settings may be modified at any time. Using the ODBC Administrator, you may modify the System Data Source and Option settings.

To Setup the System Data Source:

  1. From the ODBC Administrator, click Add.
  2. Highlight the Advantage StreamlineSQL ODBC line, then click OK.
  3. Type a unique Data Source Name. For example, type PerfData_Ope1. This name is used by applications to reference the data source.
  4. Specify the Database or Data Dictionary path. Type a valid path name to a mapped drive on the server where the Advantage Database Server is installed or the path and file name of your Advantage Data Dictionary. Click Browse to select a Database path or check the Data Dictionary check box and then browse to select a Data Dictionary file.
  5. Review the options and change them to your desired setup.
  6. Once the Options are reviewed and/or altered, click OK to exit and save the settings. The new data source is displayed.
  7. Click Close to exit the ODBC Administrator.

Notes :
Multiple Advantage System Data Sources may need to be defined for your environment. If different settings are needed for ODBC connections in one application, separate Data Sources may be required.

For free connections, a directory must be selected as the Database or Data Dictionary Path for the Advantage ODBC Driver to reference (e.g., x:data). All free tables in the directory will be available to the driver.

If you need to access a table located in a sub-directory of the directory defined as the Database for your Data Source you can use relative paths or UNC (e.g., “servervolumepath able”) for your SQL statements.

The following example shows how to select all the data of the table ´mytable.dbf´ stored in the directory ´mysubdir´ that is expected to be a sub-directory of the original connection path directory:

SELECT * FROM [mysubdirmytable.dbf]

Notes about software powered by Pgs-Progisoftware

– To access data of the software powered by Pgs-Progisoftware, Options must be customized as below.

– For the Available Server Types option, check the Local Server box if you do not use an Advantage Database Server (if you work on a local copy of a file for instance). The Remote Server box must always be checked.

odbc_ads_pgs

Accessing data via ODBC in ASP

The following example explains how to list all records of the table ‘my_table’ (file: my_table.dbf) which contains two fields ‘NAME’ and ‘EMAIL’ in ASP.

Pre-requirements :
System Data Source (system DSN) ‘my_base’ creation (as described previously).
The file ‘my_table.dbf’ must be stored in the directory selected as Database for the System Data Source ‘my_base’.

odbc_ads_asp

Access data via ODBC in PHP

The following example explains how to list all records of the table ‘my_table’ (file: my_table.dbf) which contains two fields ‘NAME’ and ‘EMAIL’ in ASP.

Pre-requirements :
System Data Source (system DSN) ‘my_base’ creation (as described previously).
The file ‘my_table.dbf’ must be stored in the directory selected as Database for the System Data Source ‘my_base’.

odbc_ads_php

Published 12/13/2004

Posted by : lguillaux