Example #1
0
 /// <summary>
 /// 初始化数据库
 /// </summary>
 /// <param name="Path">链接地址</param>
 /// <param name="Type">数据库类型</param>
 /// 
 void IniDB(string Path, DataBaseProvider Type)
 {
     try
     {
         dbOperator = DBService.DBOperator.GetInstance(Path, Type);
         info.DBStatic = "连接正常";
     }
     catch (Exception ex)
     {
         WRITELOG.Error(ex.Source.ToString() + "||" + ex.Message.ToString() + "||" + DateTime.Now.ToString(), ex);
         info.DBStatic = "连接异常";
     }
 }
Example #2
0
 /// <summary>
 /// 初始化数据库
 /// </summary>
 /// <param name="Path">链接地址</param>
 /// <param name="Type">数据库类型</param>
 /// 
 void IniDB(string Path, DataBaseProvider Type)
 {
     dbOperator = DBService.DBOperator.GetInstance(Path, Type);
 }