[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
On Jan 10, 2009, at 12:10 AM, Lukasz Szybalski wrote: On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison rickmorri...@gmail.com wrote: The MSSQL connection string changed for the 0.5 final release. In particular, the dsn keyword is removed, and the pyodbc connection string now expects the DSN to be named where the host was previously placed, so the new connection URL would be: mssql://username:passw...@mydbodbc For fine-grained control over pyodbc connections, a new odbc_connect keyword allows a full ODBC connection string to be specified. See the mssql module doc comments for details. ok. I'll test it out on monday.. http://www.sqlalchemy.org/docs/05/reference/dialects/mssql.html#connecting ps. I miss the one page documentation(easier to search) , is that available or can be done with sphinx? download the PDF, that's what it's for.I dont update it quite as frequently as the HTML docs tho. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
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) ('0', '[0] [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) ('0', '[0] [iODBC] [Driver Manager]dlopen(FreeTDS, 6): image not found (0) (SQLDriverConnectW)') None None TJ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
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) ('0', '[0] [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) ('0', '[0] [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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
The MSSQL connection string changed for the 0.5 final release. In particular, the dsn keyword is removed, and the pyodbc connection string now expects the DSN to be named where the host was previously placed, so the new connection URL would be: mssql://username:passw...@mydbodbc For fine-grained control over pyodbc connections, a new odbc_connect keyword allows a full ODBC connection string to be specified. See the mssql module doc comments for details. Rick --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison rickmorri...@gmail.com wrote: The MSSQL connection string changed for the 0.5 final release. In particular, the dsn keyword is removed, and the pyodbc connection string now expects the DSN to be named where the host was previously placed, so the new connection URL would be: mssql://username:passw...@mydbodbc For fine-grained control over pyodbc connections, a new odbc_connect keyword allows a full ODBC connection string to be specified. See the mssql module doc comments for details. ok. I'll test it out on monday.. http://www.sqlalchemy.org/docs/05/reference/dialects/mssql.html#connecting ps. I miss the one page documentation(easier to search) , is that available or can be done with sphinx? Thanks, 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 -~--~~~~--~~--~--~---
[sqlalchemy] Re: Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0
Hi, On Sat, Jan 10, 2009 at 12:10 AM, Lukasz Szybalski szybal...@gmail.comwrote: On Fri, Jan 9, 2009 at 4:46 PM, Rick Morrison rickmorri...@gmail.com wrote: The MSSQL connection string changed for the 0.5 final release. In particular, the dsn keyword is removed, and the pyodbc connection string now expects the DSN to be named where the host was previously placed, so the new connection URL would be: mssql://username:passw...@mydbodbc We actually left support for that in there just so we wouldn't break everyone's connection strings, but you should use the new syntax. ps. I miss the one page documentation(easier to search) , is that available or can be done with sphinx? Have you tried the sphinx search? I think it's the best thing ever. Very handy and fast. -- Michael Trier http://blog.michaeltrier.com/ http://thisweekindjango.com/ --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---