sqlfetch() — Fetch Next Row of Open Cursor
Fetches the next row of data for an open cursor. This function supports the EXEC SQL FETCH...INTO... statement.
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 for the open cursor. For more information on request handles, see the "SQL Request Handles" section.
flag
An execution flag that the SQL preprocessor initializes.
prequest
A pointer to the text of the statement.
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 fetches the next row of the open cursor x (associated with request handle sql0), and deposits the column values into the corresponding local variables
custnum
,nam
,city
,state
, andmaxcred:
SEE ALSO
sqldynftch() — Fetch Next Row of Dynamic Cursor for dynamic fetches, sqlrequest() — Execute a Static ESQL Statement for opening static cursors, and sqldynposfetch() — Fetch Row of Dynamic Open Cursor for positioned fetches.
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |