Esempio n. 1
0
        /// <summary>
        /// 创建驱动的连接
        /// </summary>
        /// <returns></returns>
        private IDbConnection NewConnection()
        {
            long          start      = DateTime.Now.Ticks;
            IDbConnection connection = null;

            try
            {
                if (string.IsNullOrEmpty(dllPath))
                {
                    dllPath = Path.Combine(config.DriverDir, config.DriverDLL);
                }
                connection = ProxyLoad.GetConnection(dllPath);
                if (connection == null)
                {
                    throw new Exception("DataSource returned null unexpectedly");
                }
                SetupConnection(connection);
                return(connection);
            }
            catch (Exception e)
            {
                throw e;
            }
            finally
            {
            }
        }
Esempio n. 2
0
 public IDbDataParameter GetDataParameter()
 {
     return(ProxyLoad.GetDataParameter(dllPath));
 }
Esempio n. 3
0
 public IDbDataAdapter GetDataAdapter()
 {
     return(ProxyLoad.GetDataAdapter(dllPath));
 }
Esempio n. 4
0
 public IDbCommand  GetDbCommand()
 {
     return(ProxyLoad.GetDbCommand(dllPath));
 }