pyodbc execute command not accepting ? parameters correctly?

前端 未结 1 1153
醉酒成梦
醉酒成梦 2021-01-22 17:37

This code:

cursor.execute(\'select RLAMBD from ?\', OPTable)
print cursor.fetchone().RLAMBD

produces this error:

ProgrammingE         


        
相关标签:
1条回答
  • 2021-01-22 18:43

    Parameter placeholders cannot be used to represent object names (e.g., table or column names) or SQL keywords. They are only used to pass data values, e.g., numbers, strings, dates, etc..

    0 讨论(0)
提交回复
热议问题