I'm trying to insert some data to a SQL Server database using python script.
cursor.execute(''' insert into TM_VISITAS(
idVisita,
sesion,
idCliente,
idPhygi
)VALUES(
NEXT VALUE FOR seq_visitas,
?,
?,
?
) ''',
(
total_dict.get("Session_id") ,
total_dict.get("Client_id"),
total_dict.get("Device_id")
)
)
but this is what I receive:
pyodbc.ProgrammingError: ("A TVP's rows must be Sequence objects.", 'HY000')
Can someone tell me how to insert a sequence value using python?