public DataSet ExecuteDataSet(CommandType commandType, string commandText) { this.idbCommand = DBManagerFactory.GetCommand(this.ProviderType); PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters); IDbDataAdapter dataAdapter = DBManagerFactory.GetDataAdapter (this.ProviderType); dataAdapter.SelectCommand = idbCommand; DataSet dataSet = new DataSet(); dataAdapter.Fill(dataSet); idbCommand.Parameters.Clear(); return(dataSet); }
public DataSet ExecuteDataSet(CommandType commandType, string commandText, int startRecord, int maxRecords, string srcTable) { this.idbCommand = DBManagerFactory.GetCommand(this.ProviderType); PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters); IDbDataAdapter dataAdapter = DBManagerFactory.GetDataAdapter (this.ProviderType); dataAdapter.SelectCommand = idbCommand; DataSet dataSet = new DataSet(); ((SqlDataAdapter)dataAdapter).Fill(dataSet, startRecord, maxRecords, srcTable); #if MySql ((MySqlDataAdapter)dataAdapter).Fill(dataSet, startRecord, maxRecords, srcTable); #endif idbCommand.Parameters.Clear(); return(dataSet); }