My rationale for using mssql+pymssql was because it connects directly using C API instead of ODBC. I could simply connect using the freetds_name instead of installing ODBC drivers.
I tried installing version 0.40 of python-sybase for use with FreeTDS. I was able to connect and run a query using tsql, but not through python-sybase. In both cases, I got a "TDS: unexpected token 73" message; but tsql continued to give me a query prompt, while python-sybase raised a DatabaseError exception. I am using tds version 4.2 for my connection, so it seems (and I might be wrong here) that pymssql would be compatible with that version of the TDS protocol. So that is/was my rationale. I was hoping it would just work, and I'm sure you have better places to devote your development cycles :-) Thank you for your work and your responsiveness. Sincerely yours, Firass. On Monday, August 6, 2012 12:21:35 PM UTC-7, Michael Bayer wrote: > > > On Aug 6, 2012, at 2:58 PM, Firass Asad wrote: > > Good day! I have an existing setup connecting (doing selects only) to a > sybase database and I can successfully use sybase+pyodbc or mssql+pyodbc > interchangeably... Now I'm trying to setup and use mssql+pymssql instead, > and I am getting an error. > > > why connect mssql+pymssql to sybase? we support the python-sybase > driver directly: http://python-sybase.sourceforge.net/ > > > I can successfully connect and query pymssql directly, but it appears that > my connection isn't setting server_version_info and it is causing an error > on line 1117 of the mssql base dialect file[1]. > > if I change this line from: > if self.server_version_info[0] not in range(8, 17): > to: > if self.server_version_info and self.server_version_info[0] not in range(8 > , 17): > > then everything works fine. > > I'm not sure if you care to support sybase connections using the mssql > dialect, but it seems like you wouldn't want emitting a warning cause an > uncaught exception. > > > there's probably lots more issues than just this one. If sybase+pymssql > is a use case worth supporting, it would be a new sybase dialect. However, > looking at pymssql http://code.google.com/p/pymssql/ I don't see any > mention of "is also sybase compatible". > > The SQLAlchemy project certainly aims to support as many usage models as > possible, but supporting DBAPI combinations that aren't supported by the > DBAPIs themselves, especially when there are supported alternatives, is not > a great place to spend development cycles. > > Additional information on your rationale here would be helpful ! > > > > > > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/TItLozwd9pwJ. 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.