I have been trying to connect to SQL Server from Flask but with no luck.
I can connect to DB when i try in my Local Machine and it works perfectly fine, but when i try to connect from VM/Remote Desktop, i see the below error.
I have spent lot of time trying to figure out the issue and for solution, but no luck. I suspect something should be with firewalls or security.
Thanks in Advance for help.
conn = pyodbc.connect('Driver={SQL Server};'
'Server=DEV001;'
'Database=ZXCZ;'
'user=gendb;'
'Password=qwe123;')
OperationalError: ('08001', '[08001] [Microsoft][ODBC SQL Server Driver]
[DBNETLIB]SSL Security error (18) (SQLDriverConnect);
[08001] [Microsoft][ODBC SQL Server Driver]
[DBNETLIB]ConnectionOpen (SECCreateCredentials()). (1);
[08001] [Microsoft][ODBC SQL Server Driver]Invalid connection string attribute (0)')
{SQL Server}is the right driver? github.com/mkleehammer/pyodbc/wiki/…{SQL Server}worked fine when i try in my Local Machine, but i see issues only when i try in Virtual Machine.uidandpwdinstead of user and password. Also, remember a virtual machine is different environment than local machine. It must have network or remote access to database and installed ODBC drivers.