I\'m trying to execute a query using pyodbc with this kind of code
cursor.execute(\"SELECT x from y where Name=\'%s\'\"%namepar)
The parame
You can pass parameters, and that will be escaped.
cursor.execute("SELECT x from y where Name = ?", (namepar,))
http://www.python.org/dev/peps/pep-0249/#id15
http://code.google.com/p/pyodbc/wiki/Cursor