The BASIS SQL Engine allows you access to native databases and ODBC databases. ODBC databases are defined using the local platform-dependent ODBC Administrator. Once a database is defined and associated with an ODBC driver from the ODBC Administrator, it will be available for access from the BASIS SQL Engine. Native databases consist of one or more PRO/5 files and a data dictionary that describes the characteristics of those files. Each database must be described in an sql.ini file. The number of SQL channels is limited to 32.
NOTE: You must have the following single line in your config.bbx file before you can access SQL commands:
The optional path parameter points to the location of your sql.ini file. If the path is not given PRO/5 assumes that the sql.ini file is in the current directory. This line enables the SQL capability in Visual PRO/5.
The sql.ini file tells the BASIS SQL Engine about the native databases that are available. For example, consider the following sql.ini file:
[BASIS Data Sources]
The "BASIS Data Sources" section in the sql.ini file is required. It is case sensitive and must appear as above. Under the data sources section in the .ini file is a list of available databases. Each database represents a single data dictionary.
Each data source must have its own section, spelled exactly like it was in the "BASIS Data Source" section of the sql.ini file. Each data source must have its own configuration file. The configuration file for each data source indicates where the physical dictionary and the logical data for that data source exist. Consider the following configuration file:
# Chile Company Configuration File
Lines that begin with a "#" are comments. The DICTIONARY value must point to the physical location of the data dictionary. Often, to resolve the location of the file paths defined in the dictionary, it is necessary to establish a global path to that data. If this is the case, then you should also define all the globals in your dictionary configuration file that are required to resolve the physical path to your data. This is typically the DATA value.
There are two tools available for defining data dictionaries. DDBuilder provides a graphical interface for setting up and maintaining data dictionaries. It is provided with Visual PRO/5. The _ddedit.utl utility provides a character-based interface to do the same work. It is part of the Extended Utility Set.