You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
DPY-2004: "parameters" argument should be a list of sequences or dictionaries, or an integer specifying the number of times to execute the statement
Does your application call init_oracle_client()?
does not work regardless if it is thin or thick mode.
Include a runnable Python script that shows the problem.
import pyodbc
cnxn = pyodbc.connect('DRIVER={SQL Server};SERVER=SQLSRV01;DATABASE=DATABASE;UID=USER;PWD=PASSWORD')
cursor = cnxn.cursor()
cursor.execute("SELECT 1, 2 UNION SELECT 3, 4")
results = cursor.fetchall()
with oracledb.connect(user=un, password=pw, dsn=cs) as connection:
with connection.cursor() as oracle_cursor:
oracle_cursor.executemany("insert into ParentTable values (:1, :2)", results)
I get the following error on the last line: DPY-2004: "parameters" argument should be a list of sequences or dictionaries, or an integer specifying the number of times to execute the statement
workaround for those encountering similar issues is to convert pyodbc rows into regular list:
results = [list(row) for row in cursor.fetchall())]
but I am not looking for a workaround, I need a solution for this as pyodbc.rows are more powerful than a regular list. and converting a huge stack of code to the workaround above should be temporary and not the final solution.
V.1.3.1 on windows and linux
error
DPY-2004: "parameters" argument should be a list of sequences or dictionaries, or an integer specifying the number of times to execute the statement
Does your application call init_oracle_client()?
does not work regardless if it is thin or thick mode.
Include a runnable Python script that shows the problem.
I get the following error on the last line:
DPY-2004: "parameters" argument should be a list of sequences or dictionaries, or an integer specifying the number of times to execute the statement
more info:
This works with no problem in cx_oracle!
The text was updated successfully, but these errors were encountered: