Collection Contents Index Using the compatibility library Upgrading databases pdf/chap5.pdf

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

Capturing dbclient command-line information


Version 5 client applications that connect to a database server do so via the SQL Anywhere Client, an executable named dbclient.exe. The client executable command line contains information needed to locate a server, including the following:

In Version 6, this information is held in an ODBC data source along with other connection information. As there is no longer a client executable, there is no longer a client command line. In Version 6, Embedded SQL applications can use ODBC data sources as a source of connection parameters.

Client command line scope 

Only one Version 5 client executable can be run at a time, and it may be used by more than one application and handle connections to more than one server. The command-line information is therefore global to the machine.

Top of page  How to capture client command-line information

During upgrade to Version 6, you must ensure that Version 5 dbclient command-line information is captured in such a way that the Version 6 ODBC or Embedded SQL applications can use it. You can do this in one of the following ways:

The way to capture client command-line information depends on where the information is located.

Where command-line information is located 

Your existing command line information may be held in one of the following places.

How to capture the information 

Top of page  How the compatibility client executable works

The Version 6 compatibility client executable does not serve the same purpose as the Version 5 client executable. Instead, it simply places the command-line parameters into a specially-named data source and terminates.

The compatibility data source is named dbcli6 Connection Parameters.

When dbcli6.exe is needed 

The Version 6 compatibility client is only needed when the existing Version 5 application runs the client from outside an ODBC data source.

If the ODBC data source contains a START parameter that holds the dbclient command line, this information is captured in Version 6 form when the ODBC data source is upgraded, and you do not need to use the Version 6 compatibility client.

If you store the client command line in a batch file, under an icon on your desktop, or in an initialization file used by an Embedded SQL application, you need to replace dbclient with dbcli6.exe in this command line.

Typical use for the compatibility client 

The most common method of using the client in Version 5 applications is as follows:

  1. The dbclient command line includes a server name. This server name is the default server for connections made through that client.

  2. The client application runs without specifying a server. The Version 5 interface library locates the client, and connects to its default server.

How the compatibility data source works 

When you replace dbclient with dbcli6 in the client command line, the following set of steps takes place:

  1. When the dbcli6 command line is executed, the compatibility client creates a data source named dbcli6 Connection Parameters, and then stops.

    The special data source, named dbcli6 Connection Parameters, is called a compatibility data source. The name is reserved for use by the compatibility client, and you should not use it for any other purpose.

  2. The client application starts. Its connection string is handed to the compatibility library.

  3. The compatibility library attempts to connect to a Version 6 server.

  4. When the application disconnects from the server, the Version 6 interface library deletes the dbcli6 Connection Parameters data source from the list of available data sources.

    This behavior allows other applications to use the compatibility data source to establish connections while the first application is running, and prevents it from being used once that application has closed down (although established connections are not affected). The lifetime of the compatibility data source is thus similar to that of the Version 5 client.

The compatibility data source is only used if no other data source is specified in the connection string or in the SQLCONNECT environment variable.

Top of page  

Collection Contents Index Using the compatibility library Upgrading databases pdf/chap5.pdf