Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » SQL Anywhere Server - Programming » ODBC support » ODBC samples

 

Building the sample ODBC program for Windows

Building the sample ODBC program allows you to run the program and see how it performs ODBC tasks, such as connecting to a database and executing statements.

Prerequisites

A recent version of Microsoft Visual Studio is required.

For x86/x64 platform builds with Visual Studio, you must set up the correct environment for compiling and linking. This is typically done using Visual Studio's vcvars32.bat or vcvars64.bat (called vcvarsamd64.bat in older versions of Visual Studio).

Context and remarks

A batch file located in the %SQLANYSAMP16%\SQLAnywhere\C directory can be used to compile and link all the sample applications.

 Task
  1. Open a command prompt and change the directory to the %SQLANYSAMP16%\SQLAnywhere\C directory.

  2. Run the build.bat batch file.

    If you are getting build errors, try specifying the target platform (x86 or x64) as an argument to build.bat. Here is an example.

    build x64

Results

The sample ODBC program is built.