/// <summary> /// Fetches Engine Mode/Type associated with the Database /// </summary> static EnginesMode Engine_Type(string Database) { if (DB_Info.ContainsKey(Database)) { return(_DBInfo[Database].Engine); } return(EnginesMode.NONE); }
static void _TransactionRecord(string UserName, string DataBase, string SQL, string Type, string Reason) { if (DB_Info.ContainsKey(DataBase)) //Prevents Out of bound errors { string URI = _DBInfo[DataBase].Path; string _SQL = "INSERT INTO Transactions (USER,DB,SQL,TYPE,Reason,\"UTC DATE\",\"UTC TIME\",PATH,SNAME) VALUES('" + UserName + "','" + DataBase + "','" + SQL.Replace("'", "''") + "','" + Type + "','" + Reason.Replace("'", "''") + "',Date(),TIME(),'" + URI + "','" + Path.GetDirectoryName(URI) + "');"; LDDataBase.Command(GlobalStatic.TransactionDB, _SQL); } }
public static DataTable GetInfo() { MemcachedClient mc = new MemcachedClient(); mc.EnableCompression = true; if (mc.Get(CacheKey) != null) { return(mc.Get(CacheKey) as DataTable); } else { if (StoreCache(CacheKey, DB_Info.GetInfo())) { return(mc.Get(CacheKey) as DataTable); } else { return(null); } } }