[egenix-users] cursor.executedirect configurable?
ballen at zeomega.com
Thu Sep 11 11:28:51 CEST 2008
M.-A. Lemburg wrote:
> You have 8 '?' markers in your query, so that looks fine. However,
> the query is rather complicated with respect to all the joins, so
> it's possible that the ODBC driver doesn't parse the query correctly
> and perhaps misses out on some of the parameter markers.
> It may also get confused by the "_3" aliases. Why the quotes and why
> double-quotes instead of square brackets ?. What setting do you
> use for QUOTED_IDENTIFIERS ?
I those "_3" aliases were created by Storm's ClassAlias; I discovered a
parameter that would allow me to specify the name when creating the
ClassAlias instances. That got rid of the "_3" aliases in the query, and
there are no more quoted identifiers, and now the query is more
readable. However, it still fails when using cursor.execute and succeeds
when using cursor.executedirect.
> Some more general questions:
> Are you using the most recent SQL Server Native client on the
> Windows machine ?
I was using the normal SQL Server driver; I changed to the SQL Server
native client but am still seeing the same behavior. As far as whether
it's the latest, it's the version that comes with Windows Server 2003
Standard Edition Service Pack 3.
> How are you converting the params before using them on
> cursor.execute() ?
I think Storm is handling that by building a tuple of a tuple of
strings, just like we would normally pass to cursor.execute for bind
parameters. I haven't checked to see exactly what it is doing there, but
we aren't having any issues with parameter substitution for any of our
Open Minds' Open Solutions
3010 Gaylord Parkway, Ste. 210
Frisco TX, 75034
214-618-9880 (ext. 8006)
More information about the egenix-users