jiaoz / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

FreeTDS SQL Server Invalid data type #285

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am using Ubuntu. I want to access Microsoft sql database using pyodbc in 
django. I installed all requirements. I wrote this

cursor.execute('SELECT Id FROM %s' %table_name) 

I am getting error which is

[HY004] [FreeTDS][SQL Server]Invalid data type (0) (SQLBindParameter)')

But, when I try this

cursor.execute('SELECT * FROM mytable')

It works fine. Why do I see that error, Is there a way to solve that issue ?

Original issue reported on code.google.com by cokod...@gmail.com on 9 Sep 2012 at 2:09

GoogleCodeExporter commented 8 years ago
Can you attach an ODBC trace for this?  I don't have my Linux test systems 
available.

Original comment by mkleehammer on 26 Sep 2012 at 8:49

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 27 Sep 2012 at 8:17

GoogleCodeExporter commented 8 years ago
What is the data type of Id?

Thanks.

Original comment by mkleehammer on 27 Sep 2012 at 10:02

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 27 Sep 2012 at 10:15

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 29 Sep 2012 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by mkleehammer on 29 Sep 2012 at 5:00