Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 6261)
+++ trunk/ippTools/src/chiptool.c	(revision 6341)
@@ -76,5 +76,5 @@
     // frames from the raw set.  This may not be quiet right as it's
     // possible (likely?) that a rawScienceExp is inserted into the
-    // database prior to /ALL/ of that exposure's Imfiles
+    // dbh prior to /ALL/ of that exposure's Imfiles
     if (pendingFrames) {
         for (int i = 0; i < rawFrames->n; i++) {
@@ -164,13 +164,13 @@
     psArray *doneImfiles = p2pendingToDoneImfile(pendingImfiles);
     for (int i = 0; i < doneImfiles->n; i++) {
-        if (!p2DoneImfileInsertObject(config->database, doneImfiles->data[i])) {
-            psError(PS_ERR_UNKNOWN, false, "database access failed");
+        if (!p2DoneImfileInsertObject(config->dbh, doneImfiles->data[i])) {
+            psError(PS_ERR_UNKNOWN, false, "dbh access failed");
             return false;
         }
     }
     // delete from pending
-    if (p2PendingImfileDeleteRowObjects(config->database, pendingImfiles, MAX_ROWS) < 0) {
+    if (p2PendingImfileDeleteRowObjects(config->dbh, pendingImfiles, MAX_ROWS) < 0) {
         // there must be atleast 1 Imfile to get this far
-        psError(PS_ERR_UNKNOWN, false, "database access failed");
+        psError(PS_ERR_UNKNOWN, false, "dbh access failed");
         return false;
     }
@@ -188,5 +188,5 @@
         psMetadata *where = psMetadataAlloc();
         psMetadataAddStr(where, PS_LIST_TAIL, "exp_id", 0, "==", pendingExp->exp_id);
-        psArray *pendingImfiles = p2PendingImfileSelectRowObjects(config->database, where, MAX_ROWS);
+        psArray *pendingImfiles = p2PendingImfileSelectRowObjects(config->dbh, where, MAX_ROWS);
         psFree(where)
         if (!pendingImfiles) {
@@ -195,8 +195,8 @@
             nukeMe->n = 0;
             psArrayAdd(nukeMe, 0, pendingExp);
-            bool status = p2PendingExpDeleteRowObjects(config->database, nukeMe, MAX_ROWS);
+            bool status = p2PendingExpDeleteRowObjects(config->dbh, nukeMe, MAX_ROWS);
             psFree(nukeMe);
             if (!status) {
-                psError(PS_ERR_UNKNOWN, false, "database access failed");
+                psError(PS_ERR_UNKNOWN, false, "dbh access failed");
                 return false;
             }
@@ -208,6 +208,6 @@
                 return false;
             }
-            if (!p2DoneExpInsertObject(config->database, doneExp)) {
-                psError(PS_ERR_UNKNOWN, false, "database access failed");
+            if (!p2DoneExpInsertObject(config->dbh, doneExp)) {
+                psError(PS_ERR_UNKNOWN, false, "dbh access failed");
                 return false;
             }
