//Fetch the getParms into a local variable now because the
//activation associated with a CallableStatement at this
//point(after the executStatement) is the current activation.
//We can now safely stuff the return value of the
//CallableStatement into the following ParameterValueSet object.
ParameterValueSet pvs = getParms();
/*
** If we have a return parameter, then we
** consume it from the returned ResultSet
** reset the ResultSet set to null.
*/
if (hasReturnOutputParameter)
{
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(results!=null, "null results even though we are supposed to have a return parameter");
}
boolean gotRow = results.next();
if (SanityManager.DEBUG)
{
SanityManager.ASSERT(gotRow, "the return resultSet didn't have any rows");
}
try
{
DataValueDescriptor returnValue = pvs.getReturnValueForSet();
returnValue.setValueFromResultSet(results, 1, true);
} catch (StandardException e)
{
throw EmbedResultSet.noStateChangeException(e);
}