pypyodbc: [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send())

白昼怎懂夜的黑 提交于 2019-12-13 07:13:11

问题


My python script reads through around half of the dataset (around 5000 rows out of 10000) and all of a sudden produces this error midway:

[Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionWrite (send())

I'm using pypyodbc to connect to the Azure SQL server. I haven't been able to find the solution anywhere online. I don't even know whats the cause that's leading to this error.

Please help.


回答1:


Hope you are doing well. Have you had a chance to look at pyodbc and pymssql?
They have a better community presence and are actively maintained. If the script fails with these drivers as well, there might be an issue with your script. I can try to help you troubleshoot if you share it.


Let me know if the issue gets fixed with the other drivers and if it does not I can help you out.

Thanks,
Meet Bhagdev
Program Manager, Microsoft




回答2:


I tried to reproduce the issue, but failed. And I observed that the package last updated in 2013. It's an old and no longer maintenance package for Python ODBC. So I don't recommend to continue to use it to access the latest Azure SQL Database.

I strongly recommended you to use the package pymssql. It's the Azure offical recommend odbc driver for Python, please refer to https://azure.microsoft.com/en-us/documentation/articles/sql-database-libraries/.

It can very good support any OS environment contains Windows, Linux, MacOS. You can refer to these docs https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-python-simple-windows/, https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-python-simple-ubuntu-linux/ and https://azure.microsoft.com/en-us/documentation/articles/sql-database-develop-python-simple-mac-osx/ to getting started.

If you want to dive into the package usgae, please refer to the offical document http://pymssql.org/en/latest/index.html.

Best Regards.



来源:https://stackoverflow.com/questions/32981390/pypyodbc-microsoftodbc-sql-server-driverdbnetlibconnectionwrite-send

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!