Index: trunk/ippTools/src/stacktool.c
===================================================================
--- trunk/ippTools/src/stacktool.c	(revision 18152)
+++ trunk/ippTools/src/stacktool.c	(revision 18336)
@@ -41,5 +41,5 @@
 static bool revertsumskyfileMode(pxConfig *config);
 
-static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state);
+static bool setstackRunState(pxConfig *config, psS64 stack_id, const char *state);
 
 # define MODECASE(caseName, func) \
@@ -486,5 +486,5 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    PXOPT_LOOKUP_STR(stack_id, config->args, "-stack_id", true, false);
+    PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false);
     PXOPT_LOOKUP_STR(state, config->args, "-state", true, false);
 
@@ -502,6 +502,6 @@
     PS_ASSERT_PTR_NON_NULL(config, false);
 
-    PXOPT_LOOKUP_STR(stack_id, config->args, "-stack_id", true, false);
-    PXOPT_LOOKUP_STR(warp_id, config->args, "-warp_id", true, false);
+    PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false);
+    PXOPT_LOOKUP_S64(warp_id, config->args, "-warp_id", true, false);
 
     // XXX need to validate the warp_id here
@@ -509,6 +509,6 @@
     // constrants
     if (!stackInputSkyfileInsert(config->dbh,
-            (psS64)atoll(stack_id),
-            (psS64)atoll(warp_id)
+            stack_id,
+            warp_id
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -574,10 +574,4 @@
 
     if (psArrayLength(output)) {
-        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, "stackInputSkyfile", !simple)) {
@@ -648,10 +642,4 @@
 
     if (psArrayLength(output)) {
-        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, "stackSumSkyfile", !simple)) {
@@ -673,5 +661,5 @@
 
     // required
-    PXOPT_LOOKUP_STR(stack_id, config->args, "-stack_id", true, false);
+    PXOPT_LOOKUP_S64(stack_id, config->args, "-stack_id", true, false);
 
     // optional
@@ -696,5 +684,5 @@
     // constrants
     if (!stackSumSkyfileInsert(config->dbh,
-                               (psS64)atoll(stack_id),
+                               stack_id,
                                uri,
                                path_base,
@@ -785,10 +773,4 @@
 
     if (psArrayLength(output)) {
-        if (!convertIdToStr(output)) {
-            psError(PS_ERR_UNKNOWN, false, "failed to convert id fields into a strings");
-            psFree(output);
-            return false;
-        }
-
         if (!ippdbPrintMetadatas(stdout, output, "stackSumSkyfile", !simple)) {
             psError(PS_ERR_UNKNOWN, false, "failed to print array");
@@ -836,7 +818,6 @@
 
 
-static bool setstackRunState(pxConfig *config, const char *stack_id, const char *state)
-{
-    PS_ASSERT_PTR_NON_NULL(stack_id, false);
+static bool setstackRunState(pxConfig *config, psS64 stack_id, const char *state)
+{
     PS_ASSERT_PTR_NON_NULL(state, false);
 
@@ -853,11 +834,11 @@
     }
 
-    char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = '%s'";
+    char *query = "UPDATE stackRun SET state = '%s' WHERE stack_id = %"PRId64;
     if (!p_psDBRunQuery(config->dbh, query, state, stack_id)) {
         psError(PS_ERR_UNKNOWN, false,
-                "failed to change state for stack_id %s", stack_id);
-        return false;
-    }
-
-    return true;
-}
+                "failed to change state for stack_id %"PRId64, stack_id);
+        return false;
+    }
+
+    return true;
+}
