Ejemplo n.º 1
0
        public object ExecuteScalar(CommandType commandType, string commandText, int?requestTimeout = null)
        {
            this.idbCommand = DBManagerFactory.GetCommand(this.ProviderType);
            PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters);
            object returnObject = idbCommand.ExecuteScalar();

            return(returnObject);
        }
Ejemplo n.º 2
0
 public void BeginTransaction()
 {
     if (this.idbTransaction == null)
     {
         idbTransaction = DBManagerFactory.GetTransaction(this.ProviderType);
     }
     this.idbCommand.Transaction = idbTransaction;
 }
Ejemplo n.º 3
0
        public int ExecuteNonQuery(CommandType commandType, string commandText, int?requestTimeout = null)
        {
            this.idbCommand = DBManagerFactory.GetCommand(this.ProviderType);
            PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters, requestTimeout);
            int returnValue = idbCommand.ExecuteNonQuery();

            idbCommand.Parameters.Clear();
            return(returnValue);
        }
Ejemplo n.º 4
0
 public IDataReader ExecuteReader(CommandType commandType, string commandText, int?requestTimeout = null)
 {
     this.idbCommand       = DBManagerFactory.GetCommand(this.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);
 }
Ejemplo n.º 5
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);
 }
Ejemplo n.º 6
0
        public DataSet ExecuteDataset(CommandType commandType, string commandText, int?requestTimeout = null)
        {
            this.idbCommand = DBManagerFactory.GetCommand(this.ProviderType);
            PrepareCommand(idbCommand, this.Connection, this.Transaction, commandType, commandText, this.Parameters, requestTimeout);
            IDbDataAdapter dataAdapter = DBManagerFactory.GetDataAdapter(this.ProviderType);

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

            dataAdapter.Fill(dataSet);
            return(dataSet);
        }
Ejemplo n.º 7
0
 public void CreateParameters(int paramsCount)
 {
     idbParameters = new IDbDataParameter[paramsCount];
     idbParameters = DBManagerFactory.GetParameter(this.ProviderType, paramsCount);
 }