Hi, This is pyodbc error, not Ignite driver's one. But according to [1] it seems that you should pass parameters as individual values or tuple, not as array list.
[1] - http://stackoverflow.com/questions/44090532/error-while-passing-arraylist-as-argument-to-insert-data-into-ignite-cache-using Best Regards, Igor On Sat, May 20, 2017 at 11:32 PM, rishi007bansod <[email protected]> wrote: > 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. >
