MS SQL Driver?
-
Is there a driver that will permit sqlalchemy to communicate with MS SQL Server? pyodbc requires c libraries so it cannot be installed. MySQL and pymysql work fine but I need to connect to MS SQL.
-
I found the pypyodbc driver which is pure python but when I try to import it I get this error:
import pypyodbc
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages-2/pypyodbc.py", line 440, in <module>
raise OdbcNoLibrary('ODBC Library is not found. Is LD_LIBRARY_PATH set?')
pypyodbc.OdbcNoLibrary: 'ODBC Library is not found. Is LD_LIBRARY_PATH set?'
-
@ihf seems to work only on MacOS and Linux, and to be not really "pure Python"
-
That's too bad. It would appear there is no way to get sqlalchemy on Pythonista to connect to SQL Server.
-
@ihf check this and try something similar to check if it works https://stackoverflow.com/questions/15750711/connecting-to-sql-server-2012-using-sqlalchemy-and-pyodbc
-
pyodbc is written in c.
I think some options would be to run a bridge program on your PC, or even something like a raspberry pi, that acts like a sql server, but just passes cursor commands/data to the mssql server.
-
The drivers work with MySQL but I guess no one has seen a need for a pure python driver for MS SQL.
-
In case anyone else has the need to use Pythonista to talk to MS SQL server, I just found and successfully tested the pure python MS SQL driver python-tds.
-
@ihf I don't need it but that's a good news