Data source name not found and no default driver specified - SQLalchemy/Sybase
I was getting this error when trying to connect to a sybase database using Microsoft's odbc driver by using the connection string shown in the SqlAlchemy examples:DBAPIError: (Error) ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)') None None
import pyodbc, sqlalchemy
def connect():
return pyodbc.connect('DSN=<dsn name>;UID=<username>;PWD=<password>')
srcEngine = sqlalchemy.create_engine('sybase+pyodbc://', creator=connect, echo=True)