Exemplo n.º 1
0
        /// <summary>
        /// 测试AdoDirect连接
        /// </summary>
        /// <returns></returns>
        private static bool TestADOConnection()
        {
            // 数据访问层的模块文件
            string DalFile = Application.StartupPath + @"\" + DLL_FILE_NAME;

            bool exists = File.Exists(DalFile);

            if (false == exists)
            {
                throw new CustomException(LOST_DAL_FILE + "\r\n\r\nFile:" + DalFile);
            }
            return(exists && DbConfiguration_Factory.TestConnection());  //SqlConfiguration().TestConnection();
        }