Issue queries
There are a number of different ways to issue SQL queries in the , each suitable for different application requirements.
The following table summarizes the methods used for issuing
queries.
Method | Description |
---|---|
ITQuery::ExecForStatus | Execute a query that does not return rows (such as CREATE, INSERT, UPDATE, or DELETE). Return a result code that says whether the query resulted in a server error. |
ITQuery::ExecOneRow | Execute a query that returns one row; flush any
results other than the first row. Useful for quickly submitting queries
that only return a single row, such as select count(*) from
systables. |
ITQuery::ExecToSet | Execute a query and retrieve all the result rows into a saved row set managed on the client. |
ITQuery::ExecForIteration | Execute a query and return one row to the application on every call to ITQuery::NextRow. |
ITCursor::Prepare/ITCursor::Open | Define a cursor for a select statement and return rows to the client on calls to ITCursor::Fetch. |
ITStatement::Prepare/ITStatement::Exec() | Prepare and execute a query that returns no rows. |