Collection Contents Index Upgrading ODBC applications Capturing dbclient command-line information pdf/chap5.pdf

New Features and Upgrading Guide
   CHAPTER 5. Upgrading to Adaptive Server Anywhere     

Using the compatibility library


The compatibility library is a dynamic library (a DLL on PCs, shared library on UNIX) that enables Embedded SQL applications to work with both Version 5 and Version 6 database servers. This section describes how the compatibility library works.

Who needs to read this section?    
You should read this section if you are upgrading SQL Anywhere Version 5 to Adaptive Server Anywhere Version 6, and have existing Embedded SQL applications that you need to work with the Version 6 server.

Top of page  The Version 5 Embedded SQL interface library

All client machines running SQL Anywhere Version 5 applications, whether connecting over a network or to a personal server, have a SQL Anywhere Version 5 interface library.

In this documentation, these files are written as dbl50?.dll.

Top of page  How Version 5 client applications locate the interface library

Version 5 client applications locate the interface library in one of the following ways:

Top of page  Using the compatibility library

The compatibility library is optionally installed as part of the Version 6 client software. It provides support for two interface libraries at the same time. You should check your installation to confirm that it is installed.

The setup program should ensure that your application calls the compatibility library instead of the Version 5 interface library.

The setup program carries out the following steps to ensure that applications call the interface library.

If you have problems using the compatibility library, you should check the order of the directories in your path, and ensure that the Version 6 location is ahead of the Version 5 location in the path.

Top of page  How the compatibility library works

Using the supplied connection string, the compatibility library attempts to connect to an Adaptive Server Anywhere database using the Adaptive Server Anywhere Version 6 interface library. If this attempt fails, it attempts to connect to a SQL Anywhere database using the SQL Anywhere Version 5 library.

The following figure illustrates how the compatibility library enables communications to both a SQL Anywhere Version 5 and an Adaptive Server Anywhere Version 6 database server. The number in the lower right hand corner of the boxes indicates the version of the software component.

The following figure illustrates the algorithm used by the compatibility library to connect to a server:

Top of page  File locations and the compatibility library

The compatibility library and the Version 5 interface library have the same file name (dbl50?.dll). For your application to use the compatibility library, it must locate it ahead of the Version 5 interface library when it searches for DLLs.

To ensure that your application locates the compatibility library ahead of the Version 5 interface library you must understand how your application searches for DLLs.

Searching for DLLs 

The Version 6 installation program places the Version 6 executable directory ahead of the Version 5 directory in the system path, so any application that is searching in the system path for dbl50?.dll will find the compatibility library ahead of the Version 5 interface library. If your application searches in a different manner, you must ensure that the compatibility library is located.

Testing to see which library is located 

You can test to see which library is located in the following ways:

Top of page  Start parameters and the compatibility library

Applications using a connection string that includes a StartLine connection parameter face some additional issues in upgrading.

The StartLine parameter provides explicit instructions for starting the database engine or the SQL Anywhere Client executable. Sample StartLine parameters are as follows:

In Version 6, the dbeng50.exe executable is replaced by the personal database server dbeng6.exe. The dbclient.exe executable is no longer required in Version 6, but a compatibility client (dbcli6.exe) is provided.

For Info     For a description of the compatibility client, see Capturing dbclient command-line information.

  To upgrade StartLine parameters:
  1. The procedure depends on where your connection parameters are stored.

Top of page  

Collection Contents Index Upgrading ODBC applications Capturing dbclient command-line information pdf/chap5.pdf