sqldyngetn() — Get a Cursor Name
Gets the cursor name currently associated with the prepared dynamic ESQL statement that a request handle specifies.
This function returns normalized values. For more information, see the function return values in the "General Diagnostics" section in this chapter:
sqln
A pointer to the request handle that a previous call to
sqldynprep()
returns. For more information on request handles, see the "SQL Request Handles" section.pname
The address of a memory location to receive the cursor name. The memory must be at least ESQL_MAXCURSNAME + 1 bytes long (the extra byte for the NULL terminator).
NOTES
EXAMPLE
- The SQL statements that use a cursor name are FETCH and positioned UPDATE and DELETE statements.
- All cursor names within an ESQL session are unique. If the application does not define a cursor name with a call to
sqldynsetn()
, ESQL generates one automatically whensqldynprep()
prepares a SELECT statement.This example prepares a cursor specification and declares a cursor for it using the DECLARE statement. After opening the cursor and fetching a row (not shown), the example retrieves the name of the cursor in
cursorname
and uses it in a positioned UPDATE request that sets the customer name in the current row to NULL:
SEE ALSO
sqldynexec() — Execute a Dynamic SQL Statement, sqldynsetn() — Define a Cursor Name,
proesql.h
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |