
BBjStoredProcedureData::setResultSet
Description
In BBj 6.0 and higher, this method sets the channel to be used as the stored procedure's result set.
Syntax
Return Value |
Method |
void |
setResultSet(java.sql.ResultSet p_sqlChannel) |
Parameters
Variable |
Description |
p_resultSet |
Instance of java.sql.ResultSet to return. |
Return Values
None.
Remarks
Either this method or setUpdateCount can be called once. Subsequent invocations result in an !ERROR=207 (BBJ_STATE).
Example
REM A sample Stored Procedure program REM Get a Stored Procedure object from the BBj File System sp! = BBjAPI().getFileSystem().getStoredProcedureData() REM Get the input parameter from the application NAME$ = sp!.getParameter("NAME") REM Open up the database that the client application is using con! = BBjAPI().getJDBCConnection(sp!.getDatabaseName()) REM Now generate and return the result set back to the client application stmt! = con!.prepareStatement("select * from customer where first_name like ?") stmt!.setString(1, NAME$) rs! = stmt!.executeQuery() sp!.setResultSet(rs!) |
See Also
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.