[Zope-DB] Return a Null string instead of a "None" string,
DCOracle2
Remy Pinsonnault
remy_pinsonnault at roche.ca
Fri Apr 30 10:25:53 EDT 2004
Thanks for your quick response Matt!
I already have dco2.c version 1.137.
What flag do I have to change to return a NULL instead of a None singleton?
I changed ZEROLENISNULL to 1 as you suggested but it does not help... The
more I think about this the more I think the problem is not in dco2 but in
Zope?? When I do a <dtml-var> of the result, I get literally "None" in my
application. Could it be that Zope interprets the None singleton as a
"None"?? This only occurs for columns of type varchar2...
One detail: there is a missing bracket ({) in source code:
#if ZEROLENISNULL
if (len == 0)
{
Py_INCREF(Py_None);
TRACE(T_EXIT,("sAs", "ResultSetItem_value", Py_None,
"0 Len"));
return Py_None;
}
#endif
Thanks
Remy
-----Original Message-----
From: Matthew T. Kromer [mailto:matt at bane.mi.org]
Sent: April 30, 2004 7:37 AM
To: remy_pinsonnault at roche.ca
Cc: zope-db at zope.org
Subject: Re: [Zope-DB] Return a Null string instead of a "None" string,
DCOracle2
DCOracle2 never returns "None" as a string -- it will return the None
singleton. There's a compile time flag in the source that controls the
behavior of if a zero-length result is returned as None or not. The default
is for this to be OFF, but this is something that is only in the CVS source
-- the 1.3 release doesn't have that change in it.
On Apr 29, 2004, at 3:59 PM, Remy Pinsonnault wrote:
Hi,
I'm running the last DCOracle2 version under Windows XP, Oracle 9i and
Python 2.3.
Right now the product returns a string containing "None" when the result is
a zero-length varchar2 (NULL). How can I change this behaviour?
Can i change something in the source code to get a Null value? At least if I
could modify the "None" string to something else it would be better because
the application is in spanish and None doesn't look good...
Thanks in advance
Remy Pinsonnault
Information Technology Specialist
PERCAN PROJECT
ROCHE LIMITED, CONSULTING GROUP
_______________________________________________
Zope-DB mailing list
Zope-DB at zope.org
http://mail.zope.org/mailman/listinfo/zope-db
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.zope.org/pipermail/zope-db/attachments/20040430/e225a71e/attachment.html
More information about the Zope-DB
mailing list