I'm attempting to write (I can read fine) values to a MSSQL instance. My code resembles:
import pypyodbc
lst = ['val1', 'val2', 'val3']
connection = pypyodbc.connect(...)
cursor = connection.cursor()
cursor.executemany("INSERT INTO table (a, b, c)VALUES(?,?,?)", lst)
This returns: Params must be in a list, tuple. I've read similar posts which suggest trying lst = list(['val1, 'val2', val3']) But this returns: list() takes at most 1 argument (3 given) I've also tried variations of cursor.execute(), but same problems.