BBjStoredProcedureData

Creation

BBjAPI > BBjFileSystem > BBjStoredProcedureData

Description

In BBj 6.0 and higher, BBjStoredProcedureData provides access to the parameters and return values of the stored procedure.

Creation

Return Value

Method

BBjStoredProcedureData

getStoredProcedureData()

Methods of BBjStoredProcedureData

Return Value

Method

string

getBBjProgram()

BBjVector

getConnectionProperties()

string

getConnectionProperty(string propertyName)

string

getDatabaseName()

object

getParameter(string p_paramName)

string

getPassword()

string

getProcedureName()

string

getUserName()

void

setParameter(string p_paramName, Object p_value)

void

setRecordSet(BBjRecordSet p_recordSet)

void

setResultSet(int p_sqlChannel)

void

setResultSet(java.sql.Result p_sqlChannel)

void

setReturn(Object p_value)

void

setUpdateCount(int p_updateCount)

Remarks

The BBjStoredProcedureData is available only during execution of 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, mode="PROCEDURE")sp!.getDatabaseName()

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

BBjTriggerData

BBjFileSystem

CREATE/ALTER PROCEDURE

CREATE/ALTER TRIGGER

Stored Procedure Case Study

Debugging Stored Procedures

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