Description
In BBj 6.00 and higher, this method sets the insert/update/delete count
for the stored procedure.
Syntax
Parameters
Parameter |
Description |
updateCount |
The number of inserted/updated/deleted
rows. |
Return Value
None.
Remarks
Either this method or setResultSet can be called once. Subsequent invocations
result in an !ERROR=207
(BBJ_STATE).
Example
rem 'Error trapping
seterr ERROR_ROUTINE
setesc ERROR_ROUTINE
rem 'Declares
declare BBjStoredProcedureData sp!
rem 'Get a Stored Procedure object from the BBj File System
sp! = BBjAPI().getFileSystem().getStoredProcedureData()
rem 'Get the parameters from the application
CUST_NUM$ = sp!.getParameter("CUST_NUM")
rem 'Do whatever you need to do here, which would typically include
rem 'updating records from one or more tables
rem 'Now set the updatecount so the client knows how many records
rem 'were affected by calling this stored procedure
sp!.setUpdateCount(15)
EOP:
release
ERROR_ROUTINE:
SETERR EOP
java.lang.System.out.println("SPROC Error @ " + DATE(0:"%Yl-%Mz-%Dz %Hz:%mz:%sz"))
msg$ = "Error #" + str(err) + " occured in " + pgm(-1) + " at line " + str(tcb(5))
if err = 77 then msg$ = msg$ + $0d0a$ + "SQL Err: " + sqlerr(chan)
java.lang.System.out.println(msg$)
sp!.setReturn(0)
release
|
See Also
BBjAPI
Object Variables
See the BBj Object Diagram for an illustration of the relationship between BBj Objects.