[Zope-DB] CVS: Products/DCOracle2/src - dco2.c:1.91
Matthew T. Kromer
matt@zope.com
Fri, 5 Oct 2001 10:41:46 -0400
Update of /cvs-repository/Products/DCOracle2/src
In directory cvs.zope.org:/tmp/cvs-serv29767/src
Modified Files:
dco2.c
Log Message:
NULL column handling fixes for problems reported by Christopher Jenkins.
dco2 will keep datatypes on Nulls for rebinds, instead of snaping to SQLT_STR.
DCOracle2 scans columns on executemany() to determine to reprepare the statement
and get the a non-None value for making a type determination.
=== Products/DCOracle2/src/dco2.c 1.90 => 1.91 ===
self->bind[i].bindp = NULL;
self->bind[i].flags = 0;
+ self->bind[i].dty = 0; /* Clear last Datatype too */
}
self->flags &= ~CURSOR_NAMEBIND_NEEDSFLUSH;
}
@@ -2346,7 +2347,9 @@
*/
if (object == Py_None) {
- bind->dty = SQLT_STR; /* Thanks to Shawn Sharples */
+ if (bind->dty == 0)
+ bind->dty = SQLT_STR; /* Nulls are STRING if there
+ ** wasnt a prior type bind */
bind->ind = -1; /* do we need more if it is null? */
} else if (object->ob_type == &BindingArrayObjectType) {
BindingArrayObject *bao = (BindingArrayObject *) object;