2

There are connection with Oracle (works good):

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,),] ) 

Give the mentioned error: pyodbc.ProgrammingError: ('HY000', 'The SQL contains 0 parameter markers,..

But in previous step Python saw the parameter marker "?". Why?

Bruno Ribeiro
  • 5,956
  • 5
  • 39
  • 48
Dan Ko
  • 21
  • 2

0 Answers0