| Issue 102: | Strange pyodbc.ProgrammingError | |
| 1 person starred this issue and may be notified of changes. | Back to list |
Hello,
I get a problem during a query on MySQL 5.0.
This is what i'm trying to do:
Connecting to MySQL.. Everything is Ok!
cursor.execute("insert into ? (test) values ('test')", 'connection')
cnxn.commit()
So, it seems that the table name (?) have to be changed with connection.
But unfortunately this is what i get:
C:\>python mysqlC.py asd asd 1
Traceback (most recent call last):
File "test.py", line 998, in <module>
cursor.execute("insert into ? (test) values ('test')", 'connection')
pyodbc.ProgrammingError: ('42000', "[42000] [MySQL][ODBC 5.1
Driver][mysqld-5.0.
67-community-nt]You have an error in your SQL syntax; check the manual that
corr
esponds to your MySQL server version for the right syntax to use near
'_latin1'connection' (test) values ('test')' at line 1 (1064)
(SQLExecDirectW)")
Why?
Aug 20, 2010
Project Member
#1
mkleehammer
Status:
Invalid
Nov 21, 2010
(No comment was entered for this change.)
Status:
NoFix
|