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

SQL Anywhere 10.0.1 » SQL Anywhere Server - Programming » SQL Anywhere Embedded SQL » Sample embedded SQL programs

Building the sample programs Next Page

Running the sample programs


The executable files and corresponding source code are located in the samples-dir\SQLAnywhere\C directory. For Windows CE, an additional example is located in the samples-dir\SQLAnywhere\CE\esql_sample directory.

To run the static cursor sample program
  1. Start the SQL Anywhere sample database, demo.db.

  2. Run the file curwnt.exe.

  3. Follow the on-screen instructions.

    The various commands manipulate a database cursor and print the query results on the screen. Enter the letter of the command you want to perform. Some systems may require you to press Enter after the letter.

To run the dynamic cursor sample program
  1. Run the file dcurwnt.exe.

  2. Each sample program presents a console-type user interface and prompts you for a command. Enter the following connection string to connect to the sample database:

    DSN=SQL Anywhere 10 Demo
  3. Each sample program prompts you for a table. Choose one of the tables in the sample database. For example, you can enter Customers or Employees.

  4. Follow the on-screen instructions.

    The various commands manipulate a database cursor and print the query results on the screen. Enter the letter of the command you want to perform. Some systems may require you to press Enter after the letter.

Windows samples

The Windows versions of the example programs use the Windows graphical user interface. However, to keep the user interface code relatively simple, some simplifications have been made. In particular, these applications do not repaint their Windows on WM_PAINT messages except to reprint the prompt.