skip to main content
IP API Reference for C/C++ : IP API for C/C++ : OASQLIP_fetch_row
 

OASQLIP_fetch_row

This function fetches data at the current cursor position and advances the cursor to the next row of the result table. If no more results are available, then OASQLIP_fetch_row returns OADS_NO_DATA.
If you want to return the results in blocks, then return OADS_BUFFER_FULL to indicate that all rows from current block have been returned. Typically, the IP is called with fetch_row and then with get_colval for each column to retrieve the data.
int OASQLIP_fetch_row(SQLIP_HSTMT sqlip_hstmt)
 
Table 19: Parameters for OASQLIP_fetch_row 
Parameter
Type
Description
INPUT
 
 
sqlip_hstmt
SQLIP_HSTMT
Statement handle.
RETURN
 
 
 
int
OADS_SUCCESS – valid row fetched.
OADS_BUFFER_FULL – indicates that the row returned in the previous OASQLIP_fetch_row call was the last row in the current block of the rows to return to the client.
OADS_NO_DATA – no more data available.
OADS_ERROR – error fetching a row.
You can use this function to control how many rows to return in each fetch block by using an IP-specific setting and keep returning rows until the limit is reached. Modify the implementation of OASQLIP_fetch_row() to return OADS_BUFFER_FULL after it returns all rows in the current buffer. No row is actually fetched by the third-party SQL engine IP when it returns OADS_BUFFER_FULL. The OpenAccess SDK Server waits until the IP returns OADS_NO_DATA or OADS_BUFFER_FULL before sending results to Client.