[Zope-DB] CVS: Products/DCOracle2/src - dco2.c:1.92

Matthew T. Kromer matt@zope.com
Thu, 11 Oct 2001 10:21:43 -0400


Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv22906/src

Modified Files:
	dco2.c 
Log Message:
Change NULL string binds to include a well-formatted string "" for Oracle 9i,
which appears to be very picky about NULL columns containing good data.


=== Products/DCOracle2/src/dco2.c 1.91 => 1.92 ===
 
 UNUSED static char ID[]="$Id$";
+const static char NULLSTR[]="";		/* for null string bind	*/
 
 
 /*-----------------------------------------------------------------------
@@ -2350,6 +2351,11 @@
 		if (bind->dty == 0)
 			bind->dty = SQLT_STR;	/* Nulls are STRING if there
 						** wasnt a prior type bind */
+		if (bind->dty == SQLT_STR) {
+			bind->valuesz = 1;
+			bind->valuep = (char *) NULLSTR;
+
+		}
 		bind->ind = -1;		/* do we need more if it is null? */
 	} else if (object->ob_type == &BindingArrayObjectType) {
 		BindingArrayObject *bao = (BindingArrayObject *) object;