I was looking for ways to speed up pushing a dataframe to sql server and stumbled upon an approach here. This approach blew me away in terms of speed. Using normal to_sql<
I was able to reproduce your issue using pyodbc 4.0.23. The MemoryError
was related to your use of the ancient
DRIVER={SQL Server}
Further testing using
DRIVER=ODBC Driver 11 for SQL Server
also failed, with
Function sequence error (0) (SQLParamData)
which was related to an existing pyodbc issue on GitHub. I posted my findings here.
That issue is still under investigation. In the meantime you might be able to proceed by
DRIVER=ODBC Driver 13 for SQL Server
, andpip install pyodbc==4.0.22
to use an earlier version of pyodbc.