Index: trunk/ippToPsps/jython/dvo.py
===================================================================
--- trunk/ippToPsps/jython/dvo.py	(revision 33494)
+++ trunk/ippToPsps/jython/dvo.py	(revision 33495)
@@ -51,14 +51,19 @@
 
     '''
-    Sets to scratch database
+    Connects to the scratch database with the provided name, if not already connected
     '''
     def setScratchDb(self, dbName):
+
+        # if we're already connected to this database, then get out of here
+        try:
+            if self.scratchDb.dbName == dbName: return
+        except: pass
 
         self.scratchDb = ScratchDb(self.logger, self.config, dbName)
         self.scratchDb.setUseFullTables(True)
 
-        # or decide if we are using the right DVO
+        # decide if we are using the right DVO
         self.correctDvo = self.scratchDb.isCorrectDvo(self.config.dvoLocation)
- 
+
         if not self.correctDvo:
             print "*******************************************************************************"
@@ -83,12 +88,4 @@
 
     '''
-    Resets all detections. Be careful
-    '''
-    def resetDetections(self):
-
-        self.logger.infoPair("Resetting", "just detections")
-        self.scratchDb.resetDvoDetectionTables()
-
-    '''
     Resets all dvo tables. Be very careful....
     '''
@@ -96,5 +93,5 @@
 
         self.logger.infoPair("Resetting", "all tables")
-        self.scratchDb.resetAllDvoTables()
+        if not self.scratchDb.resetAllDvoTables(): return False
         self.correctDvo = True
 
