| Issue 73: | a single-quote ' in a comment will hide following parameter markers | |
| 1 person starred this issue and may be notified of changes. | Back to list |
What steps will reproduce the problem?
1. write a query with parameters (paramter markers) and with a comment
before the markers, that includes an unmatched single-quote
2. connect to a database
3. execute query with cursor.execute, providing the query parameters
What is the expected output? What do you see instead?
I get:
ProgrammingError: ('The SQL contains 0 parameter markers, but 1 parameters
were supplied', 'HY000')
What version of the product are you using? On what operating system?
pyodbc-2.1.6 on Ubuntu Linux
Please provide any additional information below.
You have my query attached.
It is rather large, so you should write:
cusor.execute(open('query.sql', 'r').read(), ('10',))
to execute it.
Oct 26, 2009
Project Member
#1
mkleehammer
Status:
Investigating
Oct 27, 2009
Ok, sorry for the misplaced post. I use PosgreSql with pgODBC and unixODBC and I have also had other problems with this driver. Unlike other problems with the driver, this one raised ProgrammingError so I thought pyodbc would be the cause ... Can you please asses if the problem is in pgODBC or in unixODBC ? For me they are both poor and not very reliable, so equally likely to introduce the bug ...
Dec 31, 2009
I can't really test the drivers for you since I don't have them setup right now -- I ditched my servers and need to rebuild my test environments using VMs. I recommend asking in the pyodbc discussion group, though. Am closing since we found this isn't pyodbc.
Status:
Invalid
Nov 21, 2010
(No comment was entered for this change.)
Status:
NoFix
|