Tom Hawkins wrote:
>
>  
>
> I’m trying to get data out of a MS SQL Server 2005 database from a
> Python 2.5 script, using the odbc module - I can’t easily get anything
> more up-to-date installed on this system.
>
> ...
>
> ...it works OK, but if I try to parameterise the query:Any idea what
> I’m doing wrong please? Apologies if I’ve missed something stupid. I
> get the same error if I only specify one of the parameters with %s and
> leave the other one literal, by the way.

There are, for reasons that have never been clear to me, three different
parameter substitution styles allowed by the Python dbapi
specification.  The Win32 odbc module uses ? characters instead of %s.

A simple search-and-replace should solve your problem.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to