public void setAFDatabase(string currentDatabase) { if (currentAfdb == null || currentDatabase != currentAfdb.Name) { //Connect to Server; otherwise will be null. currentAfdb = currentSystem.Databases[currentDatabase]; } }