[egenix-users] mxODBC Cursor Unicode issue with method
executedirect().
Charlie Clark
charlie at egenix.com
Tue Aug 7 17:49:34 CEST 2007
Am 07.08.2007, 16:37 Uhr, schrieb Cliff Xuan
<Cliff.Xuan at artsalliancemedia.com>:
> selectsql2= """
> select id
> from vwUserWide
> where
> caller_language_id in ('none','en') and (
> username like ('%' + ? + '%')
> or (coalesce(firstname+' ','')+coalesce(lastname,''))
> like ('%' + ? + '%')
> or email like ('%' + ? + '%')
> or venue_longname like ('%' + ? + '%')
> or venue_shortname like ('%' + ? + '%') )
> """
> cur.execute(selectsql2, [(u'\xe5', u'\xe5', u'\xe5',
> u'\xe5',u'\xe5',)])
> cur.executedirect(selectsql2, [(u'\xe5', u'\xe5', u'\xe5',
> u'\xe5',u'\xe5',)])
> This time executedirect() returns nothing as before. Execute() doesn't
> work any more, the error message reads "Unable to derive parameter
> information when parameter marker is a function argument".
This is a bit of a convoluted query but it looks like there is a problem
with the ('%' + ? + '%') syntax. Can you rewrite that using strings? ie.,
'%?%' and this should get recognised as a string for quoting purposes.
Charlie
--
Charlie Clark
eGenix.com
Professional Python Services directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
:::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,MacOSX for free ! ::::
eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
Registered at Amtsgericht Duesseldorf: HRB 46611
More information about the egenix-users
mailing list