Index: /trunk/psLib/src/db/psDB.c
===================================================================
--- /trunk/psLib/src/db/psDB.c	(revision 7382)
+++ /trunk/psLib/src/db/psDB.c	(revision 7383)
@@ -12,6 +12,6 @@
  *  @author Joshua Hoblitt
  *
- *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-06-02 23:22:17 $
+ *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-06-07 03:30:45 $
  *
  *  Copyright 2005 Joshua Hoblitt, University of Hawaii
@@ -1060,10 +1060,19 @@
             // convert NaNs to NULL and set the buffer_length for strings
 
-            bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V);
-            bind[i].length  = &bind[i].buffer_length;
-            bind[i].buffer  = item->data.V;
-            bind[i].is_null = *(char *)item->data.V == '\0'
-                              ? (my_bool *)&isNull
-                              : NULL;
+            if ((char *)item->data.V) {
+                // will handle the case of "" as a NULL database value
+                bind[i].buffer_length = (unsigned long)strlen((char *)item->data.V);
+                bind[i].length  = &bind[i].buffer_length;
+                bind[i].buffer  = item->data.V;
+                bind[i].is_null = *(char *)item->data.V == '\0'
+                                  ? (my_bool *)&isNull
+                                  : NULL;
+            } else {
+                // handles the case of NULL as a NULL database value
+                bind[i].buffer_length = 0;
+                bind[i].length  = &bind[i].buffer_length;
+                bind[i].buffer  = NULL;
+                bind[i].is_null = (my_bool *)&isNull;
+            }
         } else {
             psError(PS_ERR_BAD_PARAMETER_TYPE , true,
