Building the sample applications

The sample programs and the build procedures to build them are installed in the C:\SYBASE\SAMPLE\MONCLT\TESTMON and C:\SYBASE\SAMPLE\MONCLT\TESTHIST directories.

For each of the sample programs, there is a project (.mak) file. For applications to be built using Microsoft Visual C/C++ version 4.0 and to be run under Windows NT or Windows 95 as a console application, the two project files are TESTMO32.MAK and TESTHI32.MAK.

To build and run the sample programs, use the following steps:

  1. Modify the PATH environment variable to include the C:\SYBASE\DLL directory in which the Sybase DLLs were installed.

  2. If you have not already done so, set the SYBASE environment variable to the Sybase \SYBASE root installation directory.

  3. If you do not have the appropriate server names in the sql.ini file, add the entries for the Adaptive Server installation, Monitor Server, and Historical Server that you intend to use to the C:\SYBASE\INI\SQL.INI file.

  4. Edit the \SYBASE\SAMPLE\MONCLT\TESTMON\ EXAMPLE.H and \SYBASE\SAMPLE\MONCLT\TESTHIST\ EXAMPLE.H files to supply the names of the Adaptive Server, Monitor Server, Historical Server (for TESTHIST only), login name on Adaptive Server, and password.

  5. Open the project (.mak) file for the sample application you want to build.

  6. If the Monitor Client Library is installed in a directory other than \SYBASE:

  7. Build the project.

  8. Run the application.

    To run applications under Windows NT or Windows 95, enter the name of the executable program from a Command Prompt window. For example:

    C:\SYBASE\SAMPLE\MONCLT\TESTMON\WinDebug\TESTMO32