Parameter passing with freetds/MSSQL2000

Marcos Sánchez Provencio <[email protected]>
Newsgroups gmane.comp.python.sybase
Organization www.burke.es
Message-ID <1045573151.1769.41.camel@cynar>
Hello

What is the current status regarding parameter passing with
freetds/MSSQL2000? I get an error if I try simple queries.

import Sybase as dbapi

con=dbapi.connect('cazalla','gotta','password','personal')
cur=con.cursor()
cur.execute('select * from usuarios where cd_usuario=@u',  
{'@u':'marcos'})
pprint.pprint(cur.fetchall())

This is what I get (line numbers are incorrect)

Traceback (most recent call last):
  File "etcPythonSybase.py", line 191, in ?
    cur.execute('select * from usuarios where
cd_usuario=@u',{'@u':'marcos'})
  File "/usr/lib/python2.2/site-packages/Sybase.py", line 379, in
execute
    self._raise_error(Error, 'ct_param')
  File "/usr/lib/python2.2/site-packages/Sybase.py", line 309, in
_raise_error
    raise exc(text)
Sybase.Error: ct_param
-- 
gpg --recv-keys --keyserver wwwkeys.pgp.net B9AD9B1B
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQA+Ui4fTwXdxLmtmxsRApozAJ0Sdm04BhdCs4MFyHqG+wRsA1cBvQCfXJjt
aLZ6gz49WWRY9kcuEGdpVvw=
=UUh9
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.