Index: trunk/ippTools/src/stacktool.c
===================================================================
--- trunk/ippTools/src/stacktool.c	(revision 12114)
+++ trunk/ippTools/src/stacktool.c	(revision 12131)
@@ -192,5 +192,5 @@
             return false;
         }
-        if (!stackInputSkyfileInsert(config->dbh, run->stack_id, atoi((char *)item->data.V))) {
+        if (!stackInputSkyfileInsert(config->dbh, run->stack_id, (psS64)atoll((char *)item->data.V))) {
             if (!psDBRollback(config->dbh)) {
                 psError(PS_ERR_UNKNOWN, false, "database error");
@@ -296,6 +296,6 @@
     // constrants
     if (!stackInputSkyfileInsert(config->dbh,
-            (psS32)atoi(stack_id),
-            (psS32)atoi(warp_id)
+            (psS64)atoll(stack_id),
+            (psS64)atoll(warp_id)
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -388,4 +388,10 @@
 
     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)) {
@@ -477,4 +483,10 @@
 
     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)) {
@@ -539,5 +551,5 @@
     // constrants
     if (!stackSumSkyfileInsert(config->dbh,
-            (psS32)atoi(stack_id),
+            (psS64)atoll(stack_id),
             uri,
             bg,
@@ -642,4 +654,10 @@
 
     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");
