skip to main content
IP API Reference for Java : Statement-level Methods for Java : sqlipGetNumcols
 

sqlipGetNumcols

This method returns the number of columns in the result set. If the statement is a DML (INSERT, UPDATE, DELETE), it should return 0 to indicate that a cursor does not exist. If the statement has been prepared or a sqlipExecuteStmt has been called and your SQL engine has determined what the result set looks like, then it should return a non-zero value and be ready to provide column descriptors when sqlipGetColspec is called.
For prepared statements, this method is called immediately after a call to sqlipPrepareStmt. If your backend data source is not capable of determining the result specification at this time, then it should return 0 for the number of columns.
This method is also called immediately after a call to sqlipExecuteStmt and sqlipOpenNextCursor. At this time, it must return a non-zero value for the number of columns if any rows are to be fetched.
int sqlipGetNumcols(xo_int piNumCols);
 
Table 97: Parameters for sqlipGetNumcols
Parameter
Type
Description
OUTPUT
 
 
piNumCols
xo_int
Number of columns if at this point you can determine the result set. Return 0 otherwise.
RETURN
 
 
 
int
OADS_SUCCESS
OADS_ERROR

See also 

sqlipExecuteStmt
sqlipGetColspec
sqlipPrepareStmt
sqlipExecuteStmt
sqlipOpenNextCursor