Index: trunk/ippTools/src/chiptool.h
===================================================================
--- trunk/ippTools/src/chiptool.h	(revision 5979)
+++ trunk/ippTools/src/chiptool.h	(revision 6032)
@@ -62,10 +62,8 @@
 typedef struct {
     char expID[32];			// free-form exposure ID string
+    psU8 P2version;
     char class;				// class of file: fpa (0), chip (1), cell (2), readout (3)?
     int Nclass;				// number of files of this class
-    int Ndone;				// number of files of this class
-    char P1version;
-    char P2version;
-    char state;
+    psU8 P1version;
 } p2PendingExposure;
 
@@ -81,5 +79,4 @@
     char log[16];			// extension for log file
     char smf[16];			// extension for object table
-    char state;				// current P2 state
 } p2PendingImfile;
 
Index: trunk/ippTools/src/p2insertPendingFrames.c
===================================================================
--- trunk/ippTools/src/p2insertPendingFrames.c	(revision 5979)
+++ trunk/ippTools/src/p2insertPendingFrames.c	(revision 6032)
@@ -21,5 +21,5 @@
 	version ++;
 
-	p2PendingExposure *pendingExposure = p2PendingExposureAlloc ();
+	p2PendingExposureRow *pendingExposure = p2PendingExposureAlloc ();
 	strcpy (pendingExposure->expID, rawFrame->exposure->expID);
 	pendingExposure->class = rawFrame->exposure->class;
@@ -52,6 +52,6 @@
 	}
 	
-	p2PendingExposureInsertOneRow (config->database, pendingExposure);
-	p2PendingImageInsertRows (config->database, pendingImages);
+	p2PendingExposureInsertObject (config->database, pendingExposure);
+	p2PendingImageInsertObjects (config->database, pendingImages);
     }
     return true;
Index: trunk/ippTools/src/p2searchPendingFrames.c
===================================================================
--- trunk/ippTools/src/p2searchPendingFrames.c	(revision 5979)
+++ trunk/ippTools/src/p2searchPendingFrames.c	(revision 6032)
@@ -2,14 +2,8 @@
 
 // select pending frames (exposure+images) which are done/not done
-psArray *p2searchPendingFrames (p2SearchConfig *config, bool isDone) {
+psArray *p2searchPendingFrames (p2SearchConfig *config) {
 
     // build 'where' structure
     psMetadata *where = psMetadataAlloc ();
-
-    if (isDone) {
-	psMetadataAddStr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_STATE_DONE);
-    } else {
-	psMetadataAddStr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_STATE_PENDING);
-    }
 
     // in order to include these restrictions, we need to define these table columns
Index: trunk/ippTools/src/p2searchRawFrames.c
===================================================================
--- trunk/ippTools/src/p2searchRawFrames.c	(revision 5979)
+++ trunk/ippTools/src/p2searchRawFrames.c	(revision 6032)
@@ -8,5 +8,4 @@
 
     psMetadataAddU8  (where, PS_LIST_TAIL, "TYPE",  0, "==", P2_TYPE_OBJECT);
-    psMetadataAddStr (where, PS_LIST_TAIL, "STATE", 0, "==", P2_START_READY);
 
     if (config->camera != NULL) {
