Progress
SQL-92
Guide and Reference
SQLCursor.getParam
Retrieves the values of Java OUT and INOUT parameters.
Format
inout_var = getParam( int
fieldIndex, short
fieldType) ;
Returns
OUT or INOUT variable
Parameters
inout_var
The target variable into which the value of an OUT or INOUT parameter is stored.
fieldIndex
An integer that specifies the position of the parameter in the parameter list.
fieldType
A short integer that specifies the datatype of the parameter. The allowable defined values for
fieldType
are listed in Table 6–2, grouped by category of data type.
Throws
DhSQLException
NOTES
- The getParam() method returns the value of an INOUT or OUT parameter identified by the number you specify in the
fieldIndex
parameter. getParam() returns the value as an object of the datatype you specify in thefieldType
parameter. Since getParam() returns the result as an instance of class Object, you must explicitly cast yourinout_var
variable to the correct data type.- If the OUT or INOUT parameter is of datatype CHARACTER, then getParam returns a Java String Object. You must declare a procedure variable of type String, and explicitly cast the value returned by getParam to type String. Before calling getParam() you must call the SQLCursor.wasNULL method to test whether the returned value is null. If getParam() is called for a null value, it raises a DhSQLException.
- See the "INOUT and OUT Parameters When One Java Stored Procedure Calls Another," section in "Java Class Reference" for an example of how and when to use SQLCursor.getParam().
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |