// to ensure we have an activation for the getParams
checkExecStatus();
synchronized (getConnectionSynchronization())
{
wasNull = false;
ParameterValueSet pvs = getParms();
try
{
pvs.validate();
} catch (StandardException e)
{
throw EmbedResultSet.noStateChangeException(e);
}
/* KLUDGE - ? = CALL ... returns a ResultSet(). We
* need executeUpdate to be false in that case.
*/
boolean execResult = super.executeStatement(a, executeQuery,
(executeUpdate && (! hasReturnOutputParameter)));
/*
** 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
{
pvs.setReturnValue(results.getObject(1));
} catch (StandardException e)
{
throw EmbedResultSet.noStateChangeException(e);
}