Here's my simple test script. Just trying to do a basic select statement. Found the basic bits on a tutorial.
from sqlalchemy import *
db = create_engine('mssql+pyodbc://user:pass@ip_address/database_name')
db.echo = True
metadata = MetaData(db)
users = Table('member', metadata, autoload=True)
def run(stmt):
rs = stmt.execute()
for row in rs:
print row
s = users.select(users.c.fname == 'Bill')
run(s)
After an hour of searching around and trying a few solutions, I'm no closer to solving it than when I started. Hopefully I've just made a simple error somewhere, but I'm unable to find it...
Here's the error I'm getting
sqlalchemy.exc.DBAPIError: (Error) ('IM002', '[IM002] [unixODBC][Driver Manager]Data source name not found, and no default driver specified (0) (SQLDriverConnect)') None None
Any help would be much appreciated!