IParameterMetaData paramInfo = getParameterMetaData( ); int count = paramInfo.getParameterCount( ); for ( int i = 1; i <= count; i++ ) { if ( paramInfo.getParameterMode( i ) == IParameterMetaData.parameterModeInOut || paramInfo.getParameterMode( i ) == IParameterMetaData.parameterModeOut ) registerOutParameter( i, paramInfo.getParameterType( i ) ); }
	public IResultSet executeQuery( ) throws OdaException	{		logger.logp( java.util.logging.Level.FINE,				CallStatement.class.getName( ),				"executeQuery",				"CallableStatement.executeQuery( )" );		try		{			if ( !maxRowsUpToDate )			{				try				{					assertNotNull( callStat );					callStat.setMaxRows( maxrows );				}				catch ( SQLException e1 )				{					//assume this exception is caused by the drivers that do					//not support "setMaxRows" method				}				maxRowsUpToDate = true;			}			/* redirect the call to JDBC callableStatement.executeQuery() */			//get procedure parameter metadata and register the output			// parameter			IParameterMetaData paramInfo = getParameterMetaData( );			int count = paramInfo.getParameterCount( );			for ( int i = 1; i <= count; i++ )			{				if ( paramInfo.getParameterMode( i ) == IParameterMetaData.parameterModeInOut						|| paramInfo.getParameterMode( i ) == IParameterMetaData.parameterModeOut )					registerOutParameter( i, paramInfo.getParameterType( i ) );			}			this.callStat.execute( );			if ( this.callStat.getResultSet( ) != null )				return new ResultSet( this.callStat.getResultSet( ) );			else				return new SPResultSet( null );		}		catch ( SQLException e )		{			throw new JDBCException( ResourceConstants.RESULTSET_CANNOT_RETURN,					e );		}	}