dataSource.setScope( targetScope ); this.scope = DataEngineImpl.createSubscope( this.dataSource.getScriptable( ) );
dataSource.setScope( createSubscope (targetScope) ); this.scope = createSubscope( this.dataSource.getScriptable( ) );
		private void prepareExecution( IQueryResults outerRts, Scriptable targetScope ) throws DataException		{			if(isPrepared)return;						dataSource = findDataSource( );				if ( targetScope == null )			{				if ( this.dataSource != null )				{					dataSource.setScope( engine.getSharedScope( ) );					this.scope = DataEngineImpl.createSubscope( this.dataSource.getScriptable( ) );				}				else					this.scope = DataEngineImpl.createSubscope( engine.getSharedScope( ) );			}			else			{				if ( this.dataSource != null )				{					dataSource.setScope( targetScope );					this.scope = DataEngineImpl.createSubscope( this.dataSource.getScriptable( ) );				}				else					this.scope = targetScope;			}						openDataSource( );						//this.scope = DataEngineImpl.createSubscope( this.dataSource.getScriptable());			this.outerResults = outerRts;			// Create the data set runtime			// Since data set runtime contains the execution result, a new data set			// runtime is needed for each execute			dataSet = newDataSetRuntime();						    // Set up the Javascript "row" object; this is needed before executeOdiQuery			// since filtering may need the object		    rowObject = new JSRowObject( dataSet );		    this.scope.put( "row", this.scope,  rowObject );													if ( dataSet != null  )			{				// Run beforeOpen script now so the script can modify the DataSetRuntime properties				dataSet.beforeOpen();			}						// Let subclass create a new and empty intance of the appropriate odi IQuery			odiQuery = createOdiQuery( );			populateOdiQuery( );			prepareOdiQuery( );			isPrepared = true;		}