[Zope-DB] Informix and char with more than 256 Byte

M.-A. Lemburg mal at egenix.com
Tue Feb 3 05:36:11 EST 2004


Kaminski, Björn wrote:
> Hi everyone,
> 
> I haven't found anything in the archives on this topic, so here is my
> question:
> 
> I have a connect to an informix database using a "Z ODBC Database
> Connection".
> The table has a char[1000] column. When I try to insert values larger than
> 256
> Bytes I get this error "A quoted string exceeds 256 bytes".
> 
> Using mxODBC (Python Product) I can avoid this problem by using a '?' and
> passing
> the String as a Parameter.
> 
> Is there a way to do this in Zope ?

Not with the standard Zope mechanisms, I'm afraid. Z SQL Methods
don't support parameter-by-reference passing. They always quote the
parameters and place them directly into the SQL string.

Would be nice, if a future Zope version would provide optional
support for pass-by-reference as well...

Note that the mxODBC Zope DA (the Zope product wrapping mxODBC
for use in Zope) comes with some additional methods which do
allow passing in parameters by reference. However, you do have
to write the needed calling support yourself. See the mxODBC
Zope DA API documentation for details.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Feb 03 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2004-01-23: Released mxODBC.Zope.DA 1.0.8        http://zope.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Zope-DB mailing list