Exemple #1
0
 public void BeginTransaction()
 {
     if (this.idbTransaction == null)
     {
         idbTransaction = DBManagerFactory.GetTransaction(this.providerType);
     }
     this.idbCommand.Transaction = idbTransaction;
 }
Exemple #2
0
        public int ExecuteNonQuery(CommandType commandType, string commandText)
        {
            this.idbCommand = DBManagerFactory.GetCommand(this.providerType);
            PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.parameters);
            int returnValue = idbCommand.ExecuteNonQuery();

            idbCommand.Parameters.Clear();
            return(returnValue);
        }
Exemple #3
0
 public IDataReader ExecuteReader(System.Data.CommandType commandType, string commandText)
 {
     this.idbCommand       = DBManagerFactory.GetCommand(providerType);
     idbCommand.Connection = this.Connection;
     PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.parameters);
     this.DataReader = idbCommand.ExecuteReader();
     idbCommand.Parameters.Clear();
     return(this.DataReader);
 }
Exemple #4
0
 public void Open()
 {
     idbConnection = DBManagerFactory.GetConnection(this.providerType);
     idbConnection.ConnectionString = this.ConnectionString;
     if (idbConnection.State != ConnectionState.Open)
     {
         idbConnection.Open();
     }
     this.idbCommand = DBManagerFactory.GetCommand(this.providerType);
 }
Exemple #5
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);
        }
Exemple #6
0
 public void CreateParameters(int paramsCount)
 {
     idbParameters = new IDbDataParameter[paramsCount];
     idbParameters = DBManagerFactory.GetParameters(this.providerType, paramsCount);
 }