Skip to content
5 changes: 5 additions & 0 deletions mssql_python/cursor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,11 @@ def executemany( # pylint: disable=too-many-locals,too-many-branches,too-many-s
"DAE parameters detected. Falling back to row-by-row execution with streaming.",
)
for row in seq_of_parameters:
# Convert Row objects to tuples for compatibility with execute()
# Row objects from fetch APIs must be converted since _map_sql_type
# only recognizes primitive types (str, int, etc.), not Row objects
if hasattr(row, "_values") and hasattr(row, "__iter__"):
row = tuple(row)
Comment thread
gargsaumya marked this conversation as resolved.
Outdated
self.execute(operation, row)
Comment thread
gargsaumya marked this conversation as resolved.
return

Expand Down
Loading