sqlrequest() — Execute a Static ESQL Statement
Executes any static ESQL statement, except positioned UPDATE and DELETE. This function supports any non-positioned static ESQL statement or cursor specification (EXEC SQL DECLARE...CURSOR FOR SELECT and OPEN... statements). If you precompile the statement, the preprocessor generates the r-code file to run it.
This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:
sqln
The address of a pointer to a request handle value associated with and returned for the statement. If the statement is an open cursor statement, this argument tracks all statements for the cursor. For more information on request handles, see the "SQL Request Handles" section.
flag
An execution flag that ESQL initializes.
prequest
A pointer to the text of the statement. If you precompile the statement, the text contains the name of the r-code file associated with the statement.
pcursnam
A pointer to the name of the cursor for the statement. If it is a non-cursor request, the pointer resolves to a null string.
pvformat
A pointer to a format string that describes the types and lengths of the embedded host variables.
psqlv
A pointer to the host variables to which the current SQL request refers.
EXAMPLEThis example opens cursor
x
(associated with request handlesql0
) for the customer table, and selects all rows of the specified columns, where columncust-nu
m is greater than the local variablehicustnum:
SEE ALSO
sqldelrow() — Delete Row at Open Cursor for executing positioned DELETE statements, sqldynexec() — Execute a Dynamic SQL Statement for executing dynamic requests, sqldynprep() — Prepare a Dynamic SQL Statement for compiling dynamic requests, sqldynrq() — Execute a Dynamic Non-SELECT Statement for compiling and executing dynamic non-SELECT statements, sqlfetch() — Fetch Next Row of Open Cursor for fetching rows of static cursors, sqlupdrow() — Update Row at Open Cursor for executing static positioned UPDATE statements.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |