Solved!! Prepare and execute a database operation (query or command). Parameters may be provided as sequence or mapping and will be bound to variables in the operation. Parameter style for pymssql is %-formatting, as in: cur.execute('select * from table where id=%d', id) cur.execute('select * from table where strname=%s', name) Please consult online documentation for more examples and guidelines.
link: http://www.sourcecodebrowser.com/pymssql/1.0.2plus- pdfsg/pymssql_8py_source.html Python 2.7.3 (default, Aug 1 2012, 05:16:07) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import pymssql >>> conn=pymssql.connect(host='IP', user='user', password='pass', database='bd') >>> cur=conn.cursor() >>> cur.execute('select * from tbl_tbl where clave=%d',123456) >>> cur.fetchall() here show all the results! SO: Ubuntu 12.04LTS python:2.7.3 pymssql: 1.0.2 freetds:0.91 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/918896 Title: returns no data from SQL server To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/pymssql/+bug/918896/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs