ASA Programming Guide
Embedded SQL Programming
Sample embedded SQL programs
The executable files are held in the Samples\ASA\C directory, together with the source code.
To run the static cursor sample program
Start the program:
Start the Adaptive Server Anywhere Personal Server Sample database.
Run the file Samples\ASA\C\curwnt.exe.
Follow the on-screen instructions.
The various commands manipulate a database cursor and print the query results on the screen. Type the letter of the command you wish to perform. Some systems may require you to press Enter after the letter.
To run the dynamic cursor sample program
Start the program:
Run the file Samples\ASA\C\dcurwnt.exe.
Connect to a database:
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=ASA 9.0 Sample
Choose a table:
Each sample program prompts you for a table. Choose one of the tables in the sample database. For example, you may enter Customer or Employee.
Follow the on-screen instructions.
The various commands manipulate a database cursor and print the query results on the screen. Type the letter of the command you wish to perform. Some systems may require you to press Enter after the letter.
The Windows versions of the example programs are real Windows programs. 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.