[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-03-05 Thread phrrn...@googlemail.com
The problem with the connection being returned to the pool was due to executing the SET IDENTITY_INSERT statement on the *cursor* rather than the *connection*. The documentation states that the connection will be returned to the pool when a statement is executed on it that doesn't return any

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread phrrn...@googlemail.com
How does one deal with driver-specific unit tests? I am running in difficulties in testing the pyodbc and python-sybase drivers for the sybase dialect. For example, test_raw_qmark works with the pyodbc driver (as it supports that style) but not with the python-sybase driver. Is there some

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread Michael Bayer
phrrn...@googlemail.com wrote: How does one deal with driver-specific unit tests? I am running in difficulties in testing the pyodbc and python-sybase drivers for the sybase dialect. For example, test_raw_qmark works with the pyodbc driver (as it supports that style) but not with the

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread phrrn...@googlemail.com
I want to automatically set IDENTITY_INSERT for a table if the identity column is explicitly listed. Likewise, after execution of an insert on a table with an identity column we want to retrieve the identity value. Any idea why the following code would cause the connection to be checked in

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread Michael Bayer
phrrn...@googlemail.com wrote: I want to automatically set IDENTITY_INSERT for a table if the identity column is explicitly listed. Likewise, after execution of an insert on a table with an identity column we want to retrieve the identity value. Any idea why the following code would cause

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread phrrn...@googlemail.com
Yes, it is based off the mssql code but I made some modifications to it to take care of situations like, for example, where there is an identity column but it is not the primary key (and hence not a 'sequence'). This means a read off the catalog to find the identity column (I believe that only

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-27 Thread Michael Bayer
phrrn...@googlemail.com wrote: Yes, it is based off the mssql code but I made some modifications to it to take care of situations like, for example, where there is an identity column but it is not the primary key (and hence not a 'sequence'). This means a read off the catalog to find the

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-26 Thread Michael Bayer
On Feb 26, 2009, at 3:55 PM, phrrn...@googlemail.com wrote: I am doing some work on a SA engine for Sybase Adaptive Server Enterprise (ASE) on top of both pyodbc and the Sybase DB-API driver. The existing sybase engine for SA only works with Sybase Anywhere (ASA). that is correct ; I've

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-26 Thread phrrn...@googlemail.com
Thanks Michael. I have a sybase.py passing *some* unit tests with both pyodbc and the Sybase driver, both running on Solaris 10 x86 against ASE 15. This is a hack that seems to work for the Sybase DBAPI module. I do have access to lots and lots of different Sybase stuff so I will start from your

[sqlalchemy] Re: Sybase DB-API driver uses @foo for placeholder names and expect parameter dict keys to be similarly named

2009-02-26 Thread Michael Bayer
we have ticket 785 for this: http://www.sqlalchemy.org/trac/ticket/785 On Feb 26, 2009, at 4:45 PM, phrrn...@googlemail.com wrote: Thanks Michael. I have a sybase.py passing *some* unit tests with both pyodbc and the Sybase driver, both running on Solaris 10 x86 against ASE 15. This is a