BBjFileSystem::getStoredProcedureData

Description

In BBj 6.0 and higher, this method returns the BBjStoredProcedureData object.

Syntax

Return Value

Method

BBjStoredProcedureData

getStoredProcedureData()

Parameters

None.

Return Value

Returns a BBjStoredProcedureData that provides access to the parameters of the Stored Procedure.

Remarks

This method throws an !ERROR=207 (BBJ_STATE) if invoked when not in a Stored Procedure.

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
chan = unt
sqlopen(chan)"BASIS.DB_CONNECTION"

rem 'Now generate and return the result set back to the client application
sqlprep(chan) "select * from customer where first_name like ?"
sqlexec(chan) NAME$
sp!.setResultSet(chan)
sqlclose(chan)

rem 'Now set the return code
sp!.setReturn("1")

See Also

BBjAPI

BBjSysGui

Object Variables

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.