Locating the interface library

The client application makes a call to one of the SQL Anywhere interface libraries. In general, the location of this DLL or shared library is transparent to the user. This section describes how to locate the library in case of problems.

ODBC driver location

For ODBC, the interface library is also called an ODBC driver. An ODBC client application calls the ODBC driver manager, and the driver manager locates the SQL Anywhere driver.

The ODBC driver manager looks in the supplied data source to locate the driver. When you create a data source using the ODBC Administrator or dbdsn utility, SQL Anywhere fills in the current location for your ODBC driver. The data source information is stored in the registry on Windows, or in the system information file on Unix (named .odbc.ini by default).

Embedded SQL interface library location

Embedded SQL applications call the interface library by name. The name of the SQL Anywhere embedded SQL interface library is as follows:

  • Windows   dblib11.dll

  • Unix   dblib11 with an operating-system-specific extension

OLE DB driver location

The provider name (SAOLEDB) is used to locate the SQL Anywhere OLE DB provider DLL (dboledb11.dll) based on entries in the registry. The entries are created when the SAOLEDB provider is installed or if it is re-registered.

ADO.NET

ADO.NET programs add a reference to the SQL Anywhere ADO.NET provider, which is named iAnywhere.Data.SQLAnywhere.dll. The .NET Data Provider DLL is added to the .NET Global Assembly Cache (GAC) when it is installed.

iAnywhere JDBC driver location

The Java package jodbc.jar must be in the classpath when you run your application. The native DLLs or shared objects must be found by the system.

  • PC operating systems   On PC operating systems such as Windows, files are looked for in the current directory, in the system path, and in the Windows and Windows\system32 directories.

  • Unix operating systems   On Unix, files are looked for in the system path and the user library path.

When the library is located

Once the client application locates the interface library, it passes a connection string to it. The interface library uses the connection string to assemble a list of connection parameters, which it uses to establish a connection to a server.