Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
When developing embedded SQL applications, you mix SQL statements with standard C or C++ source code. 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:
Design your UltraLite database.
Write your source code in an embedded SQL source file, which typically has extension .sqc.
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 BEGIN DECLARE SECTION int cost char pname; EXEC SQL END DECLARE SECTION EXEC SQL SELECT price, prod_name INTO :cost, :pname FROM ULProduct WHERE prod_id= :pid;
Preprocess the .sqc files.
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.
Compile your .cpp files.
Link the .cpp files.
You must link the files with the UltraLite runtime library.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|