jBASE ODBC Connector (jODBC)


jODBC Configuration

Package Contents

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:

 

  • jBASE 5.x for Windows

  • jBASE ODBC Installer

 

 

The jODBC installer deploys the following files:

 

jodbc.dll jBASE ODBC Driver Library
libjODBCSetup.dll jBASE ODBC Setup Library
ACE.dll ACE (Adaptive Communication Environment) Libraries
ACE_SSL.dll  
libeay32.dll OPENSSL Libraries
ssleay32.dll  
icuuc40.dll ICU (International Components for Unicode) libraries
icudt40.dll  

 

NOTE:  The ODBC installer copies the ODBC driver and setup libraries to the following locations.

64 bit drivers,         %windir%\System32
32 bit  directory,     %windir%\SYSWOW64
64 bit utilities,         %ProgramFiles%\jBASE ODBC Connector

 

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.

 

 

Installing 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.

 

 

Configuring DSNs

 

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:

           JSQL_FILENAME_CATALOG=/home/my_catalog

The only files made visible via ODBC/SQL are the ones listed in the catalog.

The user should never create this file manually,
        - The SQL Catalog file will be automatically created by the sqlcatman the first time it is used to add an entry. This file should not be created manually.
        - The entries in the SQL Catalog file are updated and maintained via the sqlcatman utility.

 

Connection strings

 

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 Data Source Name
DRIVER Name of ODBC Driver. Must be jBASE ODBC Driver
DESCRIPTION DSN Description
SERVER Server Address
PORT jAgent Port Number
UID User ID
ACCOUNT jBASE Account. User Authentication will be used if this field is blank
PWD User/Account Password
SCHEMA Schema Name. used. Reserved for future yse
SSL Enable SSL Encryption (1 = Enable SSL, 0 = Disable SSL [default])
SSL_CERTIFICATE Path to SSL Certificate File
SSL_KEY Path to SSL Public Key File
COMPRESSION Enable Data Compression (1 = Enable comp., 0 = Disable comp. [default])
COMP_THRESHOLD Compression Threshold. Default = 1024 byte
USER_CATALOG value to be used to set JSQLFILENAME_CATALOG on the server for the current connection

 

 

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.

 

Example:

           DSN=T24;SERVER=127.0.0.1;PORT=20002;UID=test;PWD=test;USER_CATALOG=/home/jimbo/data/jimbos_catalog

 

 

 

 

 


jBASE ODBC Connector