error( Messages.getInstance().getErrorString( "SQLBaseComponent.ERROR_0007_NO_CONNECTION" ) ); //$NON-NLS-1$
return false;
}
String query = applyInputsToFormat( rawQuery );
SQLConnection sqlConnection = null;
if ( ( connection instanceof SQLConnection ) ) {
sqlConnection = (SQLConnection) connection;
}
// Some of the following Added by Arijit Chatterjee passing the timeout value to SQLConnection class
if ( sqlConnection != null ) {
if ( this.getQueryTimeout() >= 0 ) {
sqlConnection.setQueryTimeout( this.getQueryTimeout() );
}
if ( this.getMaxRows() >= 0 ) {
sqlConnection.setMaxRows( this.getMaxRows() );
}
if ( this.getReadOnly() ) {
sqlConnection.setReadOnly( true );
}
}
AbstractRelationalDbAction relationalDbAction = (AbstractRelationalDbAction) getActionDefinition();
IPentahoResultSet resultSet = null;
boolean isForwardOnly = relationalDbAction.getUseForwardOnlyResultSet().getBooleanValue( false );
resultSet = doQuery( sqlConnection, query, isForwardOnly );
if ( sqlConnection.isForcedForwardOnly() ) {
isForwardOnly = true;
live = false;
warn( Messages.getInstance().getString( "SQLBaseComponent.WARN_FALL_BACK_TO_NONSCROLLABLE" ) ); //$NON-NLS-1$
}