[sqlalchemy] Re: MS SQL wrapper for pymssql DBAPI broken in 0.5.0

2009-01-11 Thread TJ Ninneman

 This has been corrected in http://www.sqlalchemy.org/trac/changeset/5641 
 .  I actually did both things, since  using the cursor is the right  
 thing to do.

Thats awesome, thanks so much for your time and help with this!

TH
--~--~-~--~~~---~--~~
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] Error Connecting to MSSQL using pyodbc and SqlAlchemy 0.5.0

2009-01-09 Thread TJ Ninneman

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 

--~--~-~--~~~---~--~~
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

2009-01-09 Thread TJ Ninneman


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: MS SQL wrapper for pymssql DBAPI broken in 0.5.0

2009-01-09 Thread TJ Ninneman
Thanks Michael, I appreciate it.

 As mentioned previously, pymssql support is no where near the level  
 of support as pyodbc. In addition the maintainer has not updated  
 this library for several years. Finally, Microsoft warns against  
 it's use going forward, When writing new applications, avoid using  
 DB-Library. When modifying existing applications, you are strongly  
 encouraged to remove dependencies on DB-Library. Instead of DB- 
 Library, you can use Microsoft ActiveX® Data Objects (ADO), OLE DB,  
 or ODBC to access data in SQL Server.

Yeah, I've always figured I was fairly safe since I run pymssql on top  
of FreeTDS.  But I'm definitely working on porting everything over to  
pyodbc.

Thanks again,

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
-~--~~~~--~~--~--~---