jBASE ODBC Connector (jODBC)
The ODBC Connector is included in jBASE 5.x but may also be deployed on Windows operating systems which do not have jBASE 5.x installed. A self-contained installer (from now on referred to as jODBC installer) is available which installs and registers the ODBC driver. Below is the list of release packages containing the ODBC Connector:
The jODBC installer deploys the following files:
NOTE: The ODBC installer copies the ODBC driver and setup libraries to the following locations.
64 bit drivers, %windir%\System32
ODBC Setup library is a separate library implementing the ODBC Setup API required by the driver manager to display graphical components such as connection dialogs. Connection dialogs enables users to configure DSNs inside Windows’ ODBC Manager (odbcad32.exe) or input connection details when requested by the driver.
The ODBC installer will automatically register the ODBC driver and ODBC Setup libraries. The registration process is required to inform the ODBC Manager about the location of the ODBC driver libraries. The ODBC installer will also add the installation directory to the global user environment variable PATH. This is necessary since the jBASE ODBC driver depends on other shared libraries as e.g. ACE, etc.
ODBC applications usually obtain the connection details from DSNs which may be configured via Microsoft’s ODBC Data Source Administrator (also known as ODBC Manager / odbcad32.exe or Control Panel -> Administrative Tools -> Data Sources (ODBC))
There will be two versions of ODBCAD installed for 32 or 64 bit applications. The correct version will be called depending on your specific use. More information on this topic can be found at https://support.microsoft.com/en-us/kb/942976
If the installation has been successful, the following driver should appear in the list of available ODBC drivers:
jBASE ODBC Driver
Adding a DSN for this driver will present the following dialog:
Most of the parameters shown in the previous picture refer to the connection details required by the remote jAgent instance. Server specifies the IP address/machine name and Port specifies the TCP port of the remote jAgent instance.
Please refer to the jAgent user guide for more information about the available options.
Pressing the test button will attempt to establish a connection to the server using the provided user/account credentials. If the driver is not correctly registered with the system or the PATH environment variable does not contain the path to the installation directory, or there is a DLL mismatch (64 vs 32 bit issues) the following message box will appear:
Most times, this error message will appear if there was a problem with the installation. The .MSI should configure the driver. Do not try to configure the driver using any other method.
In order for jODBC to access your files they need to be visible to jAgent. By default that means they would need to be in the JEDIFILEPATH for the user that started the jAgent process. jAgent runs as a service, therefore “ALL” jBASE environment variables need to be configured at a “SYSTEM” level (windows only).
Alternatively, you can specify which files are visible to jODBC by means of a SQL Catalog file. This file will contain an entry for each file that needs to be accessible to jODBC.
The location of the SQL Catalog file is set via the JSQL_FILENAME_CATALOG environment variable, or may be set on a per DSN basis using the UserCatalog option in the jBASE ODBC Data Source.
This is a critical value to set for most sites, simply set:
The only files made visible via ODBC/SQL are the ones listed in the catalog.
The user should never create this file manually,
Connection strings, as defined by the ODBC SQL CLI, specify the connection parameters supplied to the server when attempting to establish a connection. All connection attributes are defined in a single string separated by semicolons. jBASE ODBC Connector accepts the following attributes:
DSN, DRIVER, UID and PWD are attributes defined by the SQL CLI, all other attributes are jBASE ODBC Connector specific attributes. Attributes highlighted in bold are mandatory attributes.