Exemple #1
0
 public static bool IsMIBDatabaseAvailable()
 {
     try
     {
         MibHelper.FindMibDbPath();
         return(true);
     }
     catch (ApplicationException ex)
     {
         return(false);
     }
 }
Exemple #2
0
 // Token: 0x06000366 RID: 870 RVA: 0x000154B0 File Offset: 0x000136B0
 public static OleDbConnection GetDBConnection()
 {
     if (string.IsNullOrEmpty(MibHelper.dbConnectionString))
     {
         StringBuilder stringBuilder = new StringBuilder("Provider=Microsoft.Jet.OLEDB.4.0;");
         stringBuilder.Append("Data Source=");
         stringBuilder.Append(MibHelper.FindMibDbPath() + "MIBs.cfg");
         stringBuilder.Append(";Mode=Read;OLE DB Services=-1;Persist Security Info=False;Jet OLEDB:Database ");
         stringBuilder.Append("Password=SW_MIBs");
         MibHelper.dbConnectionString = stringBuilder.ToString();
     }
     return(MibHelper.CurrentConnection = new OleDbConnection(MibHelper.dbConnectionString));
 }
Exemple #3
0
        // Token: 0x06000368 RID: 872 RVA: 0x00015584 File Offset: 0x00013784
        public static bool IsMIBDatabaseAvailable()
        {
            bool result;

            try
            {
                MibHelper.FindMibDbPath();
                result = true;
            }
            catch (ApplicationException)
            {
                result = false;
            }
            return(result);
        }