Index: trunk/psLib/src/db/psDB.c
===================================================================
--- trunk/psLib/src/db/psDB.c	(revision 8610)
+++ trunk/psLib/src/db/psDB.c	(revision 8627)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.87 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-08-26 00:32:39 $
+ *  @version $Revision: 1.88 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-08-26 04:34:28 $
  *
  *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
@@ -157,5 +157,5 @@
     if (!psDBExplicitTrans(dbh, false)) {
         psError(PS_ERR_UNKNOWN, true,
-                "failed to set transaction type", mysql_error(mysql));
+                "failed to set transaction type. Error: %s", mysql_error(mysql));
 
         mysql_close(mysql);
@@ -1103,10 +1103,10 @@
             // convert NaNs to NULL and set the buffer_length for strings
 
-            if ((char *)item->data.V) {
+            if (item->data.str) {
                 // will handle the case of "" as a NULL database value
-                bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V);
+                bind[i].buffer_length = (unsigned long)strlen(item->data.str);
                 bind[i].length  = &bind[i].buffer_length;
                 bind[i].buffer  = psStringCopy(item->data.V);
-                bind[i].is_null = *(char *)item->data.V == '\0'
+                bind[i].is_null = *item->data.str == '\0'
                                   ? (my_bool *)&isNull
                                   : NULL;
@@ -1124,5 +1124,5 @@
             // make a copy of the psTime so we don't modify user data when we
             // try to do the conversion
-            if ((char *)item->data.V) {
+            if (item->data.str) {
                 psTime *time = (psTime *)item->data.V;
                 struct tm *tmTime = psTimeToTM(time);
@@ -1252,5 +1252,5 @@
         } else if (item->type == PS_DATA_STRING) {
             // + column name + _ + varchar( + length + )
-            psStringAppend(&query, "%s VARCHAR(%s)", item->name, (char *)item->data.V);
+            psStringAppend(&query, "%s VARCHAR(%s)", item->name, item->data.str);
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE, true,
@@ -1634,5 +1634,5 @@
         // + column name + _ + like + _ + ' + value + '
         // check for NULL and empty ("") strings
-        if (item->data.V == NULL || *(char *)item->data.V == '\0') {
+        if (item->data.V == NULL || *item->data.str == '\0') {
             psStringAppend(&query, "%s IS NULL", item->name);
         } else {
@@ -1642,7 +1642,7 @@
                 // very large TEXT columns that really shouldn't be
                 // used in a where clause...
-                psStringAppend(&query, "%s LIKE '%s'", item->name, (char *)item->data.V);
+                psStringAppend(&query, "%s LIKE '%s'", item->name, item->data.str);
             } else {
-                psStringAppend(&query, "%s = '%s'", item->name, (char *)item->data.V);
+                psStringAppend(&query, "%s = '%s'", item->name, item->data.str);
             }
         }
