与Oracle有联系(运作良好):
import pypyodbc as pyodbc
cnxn=pyodbc.connect("DSN=ORCL;PWD=user1")
cursor=cnxn.cursor()
cursor.execute("select * from t_v01")
s = 'sss'
f = 'fff'
cursor.execute("select * from t_v01 where t_id = ? ",[s,])
#works good (above)
cursor.execute("insert into t_v01 (t_id,t_type) values (?,?)",[(s,f,),] )
提出上述错误:pyodbc.ProgrammingError: ('HY000', 'The SQL contains 0 parameter markers,..
但是在上一步中,Python看到了参数标记"?"。为什么呢?