To run the Embedded SQL/C sample programs, set these environment variables:
SYBASE environment variable to the path of the Sybase installation directory (if it has not already been set).
SYBASE_OCS environment variable to the home directory of Open Client and Open Server products. For example, OCS-15_0 is the home directory of 15.0 version of the Open Client and Open Server products.
Check the sql.ini file to ensure that there is an entry for the server name used. You can use dsedit to look at the sql.ini file. If you added servers to the sql.ini file, as described in the Open Client and Open Server Configuration Guide for Microsoft Windows, you can use ocscfg to test for connections to these servers.
To run the sample programs, you must access an Adaptive Server that includes the pubs2 database. Refer to the Adaptive Server Enterprise Installation Guide for information on installing the pubs2 database.
Before you precompile the sample programs, you must edit the example header file, described below, and replace the user name and password with values that are valid for your Adaptive Server. Comments in the programs show where you should make the changes.