/// <summary> /// Fills a dataset /// </summary> /// <param name="executableQuery">SELECT ExecutionQuery based on which data is selected</param> /// <returns>Resulting DataSet</returns> public DataSet ExecuteDataSet(ExecutionQuery executableQuery) { DataSet dset = null; IDbDataAdapter idap = null; DataFactory factory = new DataFactory(); factory.InitializeDataAdapter(database, ref idap, command); dset = new DataSet(); command.CommandType = CommandType.Text; command.CommandText = executableQuery.Query; command.Parameters.Clear(); if (executableQuery.Parameters != null) { foreach (IDataParameter var in executableQuery.Parameters) { command.Parameters.Add(var); } } (new ExecutionEngineLogger()).LogContext(executableQuery); idap.Fill(dset); return(dset); }