On Fri, Jan 9, 2009 at 4:18 PM, TJ Ninneman <t...@twopeasinabucket.com> wrote: > > > On Jan 9, 2009, at 3:58 PM, TJ Ninneman wrote: > >> >> Since I've been having troubles with pymssql and 0.5.0 I thought I >> would try pyodbc on my Mac. >> >> I'm able to connect and execute sql using isql without issue: >> >> isql -v MyDbODBC username password >> >> But when I connect through SqlAlchemy using: >> >> sqlalchemy.url = mssql://username:password@/?dsn=MyDbODBC >> >> I get: >> >> DBAPIError: (Error) ('00000', '[00000] [iODBC][Driver >> Manager]dlopen(FreeTDS, 6): image not found (0) (SQLDriverConnectW)') >> None None >> >> Any Ideas? What exactly does "Image not found" mean? >> >> Thanks! >> >> TJ > > I run this in the context of Pylons...a sqlalchemy only example: > > >>> import sqlalchemy > >>> engine = sqlalchemy.create_engine('mssql://username:password@/? > dsn=MyDbODBC') > >>> con = engine.connect() > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/engine/base.py", line > 1231, in connect > return Connection(self, **kwargs) > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/engine/base.py", line > 538, in __init__ > self.__connection = connection or engine.raw_connection() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/engine/base.py", line > 1286, in raw_connection > return self.pool.unique_connection() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 142, in > unique_connection > return _ConnectionFairy(self).checkout() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 323, in > __init__ > rec = self._connection_record = pool.get() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 180, in > get > return self.do_get() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 615, in > do_get > con = self.create_connection() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 145, in > create_connection > return _ConnectionRecord(self) > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 217, in > __init__ > self.connection = self.__connect() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/pool.py", line 280, in > __connect > connection = self.__pool._creator() > File "/Users/tninneman/Development/twopeas/lib/python2.5/site- > packages/SQLAlchemy-0.4.8-py2.5.egg/sqlalchemy/engine/strategies.py", > line 80, in connect > raise exceptions.DBAPIError.instance(None, None, e) > sqlalchemy.exceptions.DBAPIError: (Error) ('00000', '[00000] [iODBC] > [Driver Manager]dlopen(FreeTDS, 6): image not found (0) > (SQLDriverConnectW)') None None > >>>
What is mac using to connect to mssql? For example on unix there is a freetds (free version of ms driver for sql server) and unixodbc. If mac is using the same thing then you can try: http://lucasmanual.com/mywiki/PythonManual#head-0e30402e75b2d4a8a032e6830813b779a34636e3 aka. install unixodbc, crate driver name and connect using the connection string mentioned there. Lucas --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---