I spent a while on converting the ASA dialect to run on ASE via pyodbc and python Sybase on top of both 12.5.x and 15.x. It was interesting but in hindsight I wish I had started from scratch as I burned a lot of time on some very low-level (and ultimately uninteresting) issues with unicode, FreeTDS, Sybase ct-lib messages etc. etc.
The code is in sybase.py in http://www.sqlalchemy.org/trac/ticket/785 and definitely has bugs/missing features. However, it does generate prepared statements correctly with placeholders, executes them with bind values and so on. I think that this is working for both pyodbc over FreeTDS and the Sybase driver over ct-lib. I am lobbying with my management to allocate some of my time for developing an ASE backend targets at SA 0.6 .. the layout of the 0.6 code should make things a lot simpler and cut down on the cut-and-paste between the dialects +driver pairs. pjjH On Jun 30, 10:01 am, Michael Bayer <mike...@zzzcomputing.com> wrote: > On Jun 30, 2009, at 12:09 AM, Vishakh wrote: > > > > > Hello, > > > I am modifying Alexander Houben's Sybase module in order to get > > SQLAlchemy working with Sybase Adaptive Server Enteprise. I am using > > Python 2.6, Pylons and Sybase OCS 12.5, with both mxODBC and pyodbc. > > So far, I have had some success with reflecting tables and issuing > > basic queries. However, when I filter my queries, integer values are > > quoted and this causes an error with Sybase since it doesn't support > > implicit conversions from varchar to int. Could you please tell me > > what change I would have to make in order to not quote integer values > > in my modified module? > > SQLA doesn't quote values, it sends them along as bind parameters and > its up to the DBAPI to interpret them, which may involve rendering > them directly in the SQL statement with quoting (and also may > not). So this issue would reside within the DBAPI in use. Just > as a note, I made some attempts with the sybase dialect and I can say > that FreeTDS with sybase is not usable at all since it doesn't render > bind parameters correctly. phrrn...@googlemail.com is also working > on a working ASE dialect so you might want to coordinate efforts. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---