Click here to Skip to main content
15,885,244 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I am trying to access SQL server from raspberry pi using the following query but i am unable to do that. and python shell return error:
Error:
Traceback (most recent call last):
  File "/home/pi/Desktop/FYProject/Main.py", line 171, in <module>
    main()
  File "/home/pi/Desktop/FYProject/Main.py", line 72, in main
    pwd='Password')
pyodbc.Error: ('01000', "[01000] [unixODBC][Driver Manager]Can't open lib 'SQL Server 11.0.5058' : file not found (0) (SQLDriverConnect)")
>>> 


What I have tried:

conn = pyodbc.connect(driver='{SQL Server}',
                      server='servername',
                      database='databasename',
                      uid='UserID',
                      pwd='Password')
Posted
Updated 5-Jul-19 8:54am

1 solution

Can't open lib 'SQL Server 11.0.5058': file not found (0)")
The error says it all: PYODBC cannot find the Sql Server driver.

Perhaps this article can help you get it installed/corrected:
Connect to MSSQL using FreeTDS / ODBC in Python. · GitHub[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900