Exemple #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="connection"></param>
 public DataAccessOracle(string connection, bool connect = false)
 {
     _conn = new OracleConnection(connection);
     comm  = new OracleCommand();
     comm.CommandTimeout = 0;
     comm.Connection     = _conn;
     if (connect)
     {
         if (_conn.State != ConnectionState.Open)
         {
             _conn.Open();
         }
     }
     _util = new SharedUtil();
 }
        /// <summary>
        ///
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="dbInstance"></param>
        /// <param name="connect"></param>
        public DataAccessAll(DbConnection dbInstance, bool connect = false)
        {
            _conn = dbInstance;
            comm  = dbInstance.CreateCommand();
            comm.CommandTimeout = 0;
            comm.Connection     = _conn;

            if (connect)
            {
                if (_conn.State != ConnectionState.Open)
                {
                    _conn.Open();
                }
            }
            _util = new SharedUtil();
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="connection"></param>
        /// <param name="connect"></param>
        public DataAccessSybase(string connection, bool connect = false)
        {
            _conn = new AseConnection(connection);
            comm  = new AseCommand();
            comm.CommandTimeout = 0;
            comm.Connection     = _conn;
            Encoding.RegisterProvider(CodePagesEncodingProvider.Instance);

            if (connect)
            {
                if (_conn.State != ConnectionState.Open)
                {
                    _conn.Open();
                }
            }
            _util = new SharedUtil();
        }