Index: trunk/archive/psdb/psDB.c
===================================================================
--- trunk/archive/psdb/psDB.c	(revision 3210)
+++ trunk/archive/psdb/psDB.c	(revision 3217)
@@ -8,6 +8,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-02-13 23:18:26 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-02-14 21:49:16 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -516,10 +516,10 @@
 
     if (mysql_stmt_prepare(stmt, query, (unsigned long)strlen(query))) {
-            fprintf(stderr, "Failed to prepare query.  Error: %s\n", mysql_stmt_error(stmt));
-
-            mysql_stmt_close(stmt);
-            psFree(query);
-
-            return false;
+	fprintf(stderr, "Failed to prepare query.  Error: %s\n", mysql_stmt_error(stmt));
+
+	mysql_stmt_close(stmt);
+	psFree(query);
+
+	return false;
     }
 
@@ -759,9 +759,5 @@
         bind[i].is_unsigned = mType->isUnsigned;
 
-        // convert NaNs to NULL
-        bind[i].is_null = psDBIsPTypeNaN(item->pType, item->data.V) 
-                        ? (my_bool *)&isNull
-                        : NULL;
-
+        // convert NaNs to NULL and set the buffer_length for strings
         if (item->pType == PS_TYPE_PTR) {
             if (item->type == PS_META_STR) {
@@ -779,4 +775,9 @@
                 return false;
             }
+        } else {
+            // for all primitive types
+            bind[i].is_null = psDBIsPTypeNaN(item->pType, item->data.V) 
+                            ? (my_bool *)&isNull
+                            : NULL;
         }
 
