When developing embedded SQL applications, you mix SQL statements with standard C or C++ source code. In order to develop embedded SQL applications you should be familiar with the C or C++ programming language.
The development process for embedded SQL applications is as follows:
When you need data access in your source code, use the SQL statement you want to execute, prefixed by the EXEC SQL keywords. For example:
EXEC SQL SELECT price, prod_name INTO :cost, :pname FROM ULProduct WHERE prod_id= :pid; if((SQLCODE==SQLE_NOTFOUND)||(SQLCODE<0)) { return(-1); } |
SQL Anywhere includes a SQL preprocessor (sqlpp), which reads the .sqc files and generates .cpp files. These files hold function calls to the UltraLite runtime library.
You must link the files with the UltraLite runtime library.
For more information about embedded SQL development, see Building embedded SQL applications.
Send feedback about this page via email or DocCommentXchange | Copyright © 2008, iAnywhere Solutions, Inc. - SQL Anywhere 11.0.0 |