Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }