/// <summary> /// Check database exists /// </summary> /// <returns></returns> public static bool CheckDb() { var a = Global.Connection.ConnectionString; var ok = a.SplitIndex(';', 1); if (ok == null) { a = a.SplitIndex('\\', 1); a = String.Format(@"{0}\{1}", Application.StartupPath, a); return a.CheckSqlCeConnect(); } var svr = new Server(a); return svr.CheckDbExists(Global.Connection.Database); }