Index: trunk/ippTools/src/chiptool.c
===================================================================
--- trunk/ippTools/src/chiptool.c	(revision 12096)
+++ trunk/ippTools/src/chiptool.c	(revision 12131)
@@ -169,4 +169,5 @@
             "INSERT INTO chipPendingExp\n"
             "   SElECT\n"
+            "       0\n"            // chip_id
             "       exp_tag,\n"
             "       'my recipe',\n"  // recipe
@@ -269,4 +270,10 @@
     }
 
+    if (!convertIdToStr(output)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
+        psFree(output);
+        return false;
+    }
+
     // negative simple so the default is true
     if (!ippdbPrintMetadatas(stdout, output, "chipPendingImfile", !simple)) {
@@ -307,12 +314,12 @@
         psMetadata *where = psMetadataAlloc();
         bool status = false;
-        psString exp_tag = psMetadataLookupStr(&status, config->args, "-exp_tag");        if (!status) {
-            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -exp_tag");
+        psString chip_id = psMetadataLookupStr(&status, config->args, "-chip_id");        if (!status) {
+            psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -chip_id");
             psFree(query);
             return false;
         }
-        if (exp_tag) {
-            if (!psMetadataAddStr(where, PS_LIST_TAIL, "exp_tag", 0, "==", exp_tag)) {
-                psError(PS_ERR_UNKNOWN, false, "failed to add item exp_tag");
+        if (chip_id) {
+            if (!psMetadataAddStr(where, PS_LIST_TAIL, "chip_id", 0, "==", chip_id)) {
+                psError(PS_ERR_UNKNOWN, false, "failed to add item chip_id");
                 psFree(where);
                 psFree(query);
@@ -320,4 +327,5 @@
             }
         }
+
         psString class_id = psMetadataLookupStr(&status, config->args, "-class_id");
         if (!status) {
@@ -517,4 +525,10 @@
     }
 
+    if (!convertIdToStr(output)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
+        psFree(output);
+        return false;
+    }
+
     // negative simple so the default is true
     if (!ippdbPrintMetadatas(stdout, output, "chipProcessedImfile", !simple)) {
@@ -606,4 +620,10 @@
             return false;
         }
+    }
+
+    if (!convertIdToStr(output)) {
+        psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
+        psFree(output);
+        return false;
     }
 
@@ -799,7 +819,7 @@
 
     return chipProcessedImfileRowAlloc(
+        imfile->chip_id,
         imfile->exp_tag,
-        imfile->chip_version,
-        imfile->guide_version,
+        imfile->guide_id,
         imfile->class_id,
         recipe,
@@ -819,7 +839,7 @@
  
     return chipProcessedExpRowAlloc(
+        pendingExp->chip_id,
         pendingExp->exp_tag,
-        pendingExp->chip_version,
-        pendingExp->guide_version,
+        pendingExp->guide_id,
         pendingExp->label,
         pendingExp->expgroup,
@@ -834,7 +854,6 @@
 
     return camPendingExpRowAlloc(
-        pendingExp->exp_tag,
-        0x0,        // cam version
-        pendingExp->chip_version,
+        0,                      // cam version, assigned by db
+        pendingExp->chip_id,
         pendingExp->label,
         pendingExp->expgroup,
