This section provides information about using SQL in applications.
SQL statement execution in applications
The way you include SQL statements in your application depends on the application development tool and programming interface you use.
Prepared statements
Each time a statement is sent to a database, the database server must perform the following steps:
Cursor usage
When you execute a query in an application, the result set consists of several rows. In general, you do not know how many rows the application is going to receive before you execute the query. Cursors provide a way of handling query result sets in applications.
Cursor principles
To use a cursor in ADO.NET, ODBC, JDBC, or Open Client, follow these general steps:
Cursor types
This section describes mappings between SAP Sybase IQ cursors and the options available to you from the programming interfaces supported by SAP Sybase IQ.
SAP Sybase IQ Catalog Store Cursors
Any SAP Sybase IQ Catalog store cursor, once opened, has an associated result set. The cursor is kept open for a length of time. During that time, the result set associated with the cursor may be changed, either through the cursor itself or, subject to isolation level requirements, by other transactions. Some cursors permit changes to the underlying data to be visible, while others do not reflect these changes. A sensitivity to changes to the underlying data causes different cursor behavior, or cursor sensitivity.
Result set descriptors
Some applications build SQL statements that cannot be completely specified in the application. Sometimes statements are dependent on a user response before the application knows exactly what information to retrieve, such as when a reporting application allows a user to select which columns to display.
Transactions in applications
Transactions are sets of atomic SQL statements. Either all statements in the transaction are executed, or none. This section describes a few aspects of transactions in applications.
Created May 23, 2013. Send feedback on this help topic to Technical Publications:
pubs@sybase.com