Hello,
Iam using the pyodbc module to read / write to the .mdb file.i have written the following code for extracting some data from db and it works fine.
cursor.execute("select company_name, param_key,com_value \
from key_financial_ratio \
where param_key = ? \
and com_value > ? \
and com_value < ?" \
,[paramKey,startValue,endValue])
I wish to change the above to
sql_key = "select company_name, param_key,com_value \
from key_financial_ratio \
where param_key = ? \
and com_value > ? \
and com_value < ?" \
,[paramKey,startValue,endValue]
cursor.execute(sql_key)
But it is not accepting and throwing the below error.
"The first argument to execute must be a string or unicode query."
How to solve this?