I have written following code to insert data into Ingite cache from python using ODBC driver. In this want to pass arraylist of strings(id_list) as argument. My list contains variable number of elements that is why I need to pass it as argument to query.
cursor = connection.cursor() select_string= "INSERT INTO Person (_key, id, firstName, lastName, salary) VALUES (322, ? , 'abcd', 'dhsagd', 1000)" id_list = ['test1', 'test2', 'test3', 'test4'] cursor.execute(select_string, id_list) But when I pass list of strings as parameter to query I am getting following error. Traceback (most recent call last): File "pythonOdbclist.py", line 13, in <module> cursor.execute(select_string, id_list) pyodbc.ProgrammingError: ('The SQL contains 0 parameter markers, but 4 parameters were supplied', 'HY000') -- View this message in context: http://apache-ignite-users.70518.x6.nabble.com/Error-while-passing-arraylist-as-argument-to-INSERT-data-into-Ignite-cache-using-pyodbc-tp13049.html Sent from the Apache Ignite Users mailing list archive at Nabble.com.