示例#1
0
        public int ExecuteNonQuery(CommandType commandType, string
                                   commandText)
        {
            this.idbCommand = DBManagerSingletonConnection.GetCommand();
            PrepareCommand(idbCommand, this.Connection, this.Transaction,
                           commandType, commandText, this.Parameters);
            int returnValue = idbCommand.ExecuteNonQuery();

            idbCommand.Parameters.Clear();
            return(returnValue);
        }
示例#2
0
 public IDataReader ExecuteReader(CommandType commandType, string
                                  commandText)
 {
     this.idbCommand       = DBManagerSingletonConnection.GetCommand();
     idbCommand.Connection = this.Connection;
     PrepareCommand(idbCommand, this.Connection, this.Transaction,
                    commandType,
                    commandText, this.Parameters);
     this.DataReader = idbCommand.ExecuteReader();
     idbCommand.Parameters.Clear();
     return(this.DataReader);
 }
示例#3
0
        public DataSet GetDataSet(CommandType commandType, string
                                  commandText)
        {
            this.idbCommand = DBManagerSingletonConnection.GetCommand();
            PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType,
                           commandText, this.Parameters);
            IDbDataAdapter dataAdapter = DBManagerSingletonConnection.GetDataAdapter();

            dataAdapter.SelectCommand = idbCommand;
            DataSet dataSet = new DataSet();

            dataAdapter.Fill(dataSet);
            idbCommand.Parameters.Clear();
            return(dataSet);
        }