Index: trunk/Ohana/src/opihi/dvo/dbCheckStack.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/dbCheckStack.c	(revision 20583)
+++ trunk/Ohana/src/opihi/dvo/dbCheckStack.c	(revision 20818)
@@ -23,4 +23,37 @@
       } 
 
+      // the value might be a special type of number: RA,DEC in sexigesimal or 
+      // time in YYYY/MM/DD, etc
+      // status = ohana_str_to_time (stack[i].name, &seconds);
+      // keep as time_t
+      // status = ohana_dms_to_ddd (&ddd, stack[i].name);
+      // keep as either hours (RA) or deg (DEC).
+
+      // strings protected by double quotes should parse to be special types of numbers
+      // (photcodes, dates, ra / dec)
+      if (stack[i].name[0] == '"') {
+	  if (stack[i].name[strlen(stack[i].name) - 1] != '"') {
+	      gprint (GP_ERR, "syntax error for field %s\n", stack[i].name);
+	      goto failure;
+	  }
+	  char *tmpstring;
+	  tmpstring = strncreate (&stack[i].name[1], strlen(stack[i].name) - 2);
+
+	  // attempt to parse the string as a special word:
+	  PhotCode *code;
+	  code = GetPhotcodebyName (tmpstring);
+	  if (code) {
+	      stack[i].Float = code->code;
+	      stack[i].type  = 'S';
+	      continue;
+	  } 
+
+	  // add in tests for sexigesimal, date/time
+	  // TimeRefPM = ohana_date_to_sec ("2000/01/01");
+	  
+	  gprint (GP_ERR, "syntax error for field %s\n", stack[i].name);
+	  goto failure;
+      }
+
       // this must be a field : is it already in the list?
       for (j = 0; (j < Nfields) && strcasecmp (stack[i].name, fields[j].name); j++);
@@ -33,11 +66,4 @@
       }
 
-      // the value might be a special type of number: RA,DEC in sexigesimal or 
-      // time in YYYY/MM/DD, etc
-      // status = ohana_str_to_time (stack[i].name, &seconds);
-      // keep as time_t
-      // status = ohana_dms_to_ddd (&ddd, stack[i].name);
-      // keep as either hours (RA) or deg (DEC).
-
       // this must be a field : is it a valid name?
       if (table == DVO_TABLE_MEASURE) {
@@ -49,5 +75,5 @@
       if (!status) {
 	gprint (GP_ERR, "unknown database field %s\n", stack[i].name);
-	return (FALSE);
+	goto failure;
       }
       stack[i].field = Nfields;
@@ -63,6 +89,10 @@
   *inNfields = Nfields;
   *inFields = fields;
+  return (TRUE);
 
-  return (TRUE);
+failure:
+  *inNfields = Nfields;
+  *inFields = fields;
+  return (FALSE);
 }
 
