I am trying to connect to a DB via python using Pyodbc as per below:
import pyodbc
import pandas as pd
conn = pyodbc.connect('Driver={SQL Anywhere 16};'
'Server=***.**.**.***;'
'Database=**********;'
'Trusted_Connection=yes;'
)
Data = pd.read_sql_query("SELECT * FROM * WHERE Date='20180328'", conn)
print(Data)
but receive the error:
line 4, in conn = pyodbc.connect('Driver={SQL Anywhere 16};' pyodbc.Error: ('08001', '[08001] [Sybase][ODBC Driver][SQL Anywhere]Database server not found (-100) (SQLDriverConnect)')
I have a ODBC configuration on Windows with the driver "SQL Anywhere 16" and I can connect through Squirrel SQL using this ODBC connection - any ideas on this?