What's New in SQL Anywhere Studio
Upgrading Version 5 Applications
Upgrading embedded SQL applications
This section provides step-by-step procedures for different kinds of embedded SQL applications:
Applications using an embedded database are standalone applications using the personal database server (dbeng50.exe for Version 5, dbeng9.exe for Version 9).
Client/server applications connect across a network to the network database server. In Version 5, these applications use the dbclient.exe executable.
To upgrade embedded SQL applications that use an embedded database
Install the current version of the software Newer versions of the software contain components that enable Version 5 applications to continue working. You can either install into a separate directory or over the top of your Version 5 software.
The installation places the new executable directory ahead of the Version 5 executable directory in your system path.
Ensure that your application is using the compatibility DLL If necessary, copy the compatibility library dbl50?.dll from your Adaptive Server Anywhere executable directory to a place where your application will locate it.
For example, you could copy the compatibility library to the same directory as the module of your application that loads it. The file dbl50?o.dll is installed into your Adaptive Server Anywhere executable directory. This directory must be in your path as this library is required by the compatibility library.
At this stage, your Version 5 application should continue to work as before. However, it will be connecting to your database through the compatibility library rather than directly through the Version 5 interface library.
If you have any problems at this stage, you need to check how your application locates the interface library. For information, see File locations and the compatibility library.
Create a new connection description If your application obtains its connection parameters from configuration files, batch files, or the system registry, you should prepare a new description that uses the current version of the database server. For example, Sybase Central stores connection descriptions in the system registry.
If you store a connection string that uses the DBF parameter to start the default database server, then the new database server is started automatically by the compatibility library, instead of the Version 5 database server. In this case, no new connection description is needed.
If you store a connection string that uses a Start Line parameter specifying dbeng50.exe, you must replace this with one specifying dbeng9.exe. If your application contains a hard-coded connection string, you need to take extra steps at this point.
For more information on upgrading StartLine parameters, see Start parameters and the compatibility library.
If the database server is started in some other way, such as by a batch file or using a Windows NT service, you must reconfigure this so that the new version of the database server is started instead.
Use the new connection description With this step, you are using all current software and have completed your upgrade. The database itself does not need to be upgraded to work with existing applications.
To upgrade embedded SQL client/server applications
Prepare for the upgrade This step must be carried out at each client machine. You prepare for the upgrade by installing the current version of the software.
Ensure that the installation places the current executable directory ahead of the Version 5 executable directory in your system path.
Ensure that your application is using the compatibility DLL This step must be carried out at each client machine. If necessary, copy the compatibility library dbl50?.dll from your Adaptive Server Anywhere executable directory to a place where your application will locate it.
For example, you could copy the compatibility library to the same directory as the module of your application that loads it. The file dbl50?o.dll is installed into your Adaptive Server Anywhere executable directory. This directory must be in your path as this library is required by the compatibility library.
At this stage, your Version 5 application should continue to work as before. However, it will be connecting to your database through the compatibility library rather than directly through the Version 5 interface library.
If you have any problems at this stage, you need to check how your application locates the interface library. For information, see File locations and the compatibility library.
Create a new connection description This step must be carried out at each client machine. If your application obtains its connection parameters from configuration files, batch files, or the system registry, you should prepare a new description that uses the newer database server. This description is for use when the server is upgraded.
If you store a connection string that uses a StartLine connection parameter specifying dbclient.exe, you must replace this with a new one. The new connection description should contain all the dbclient information as a set of parameters. If your application contains a hard-coded connection string, you need to take extra steps at this point.
For more information on upgrading StartLine parameters, see Start parameters and the compatibility library.
For more information about creating connection descriptions that capture the dbclient command information, see Capturing dbclient command information.
Upgrade the database server This step must be carried out at the server machine.
As with any software upgrade, back up your database before upgrading.
Install Adaptive Server Anywhere on the server machine.
Start the new database server on the database.
Use the new connection description This step must be carried out at each client machine. You need to use the new connection description to connect to the newer version of the database server. With this step, you are using all current software and have completed your upgrade. The database itself does not need to be upgraded to work with existing applications.