Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-14 Thread Sylvester Steele
Correct, that is what I did. Except, I do a conn.close() at the end rather than a del. On Tue, May 13, 2014 at 4:10 PM, Michael Bayer mike...@zzzcomputing.comwrote: On May 13, 2014, at 2:23 PM, Sylvester Steele sylvesterste...@gmail.com wrote: ODBC connection pooling setting did not

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-13 Thread Sylvester Steele
On Mon, May 12, 2014 at 6:02 PM, Sylvester Steele sylvesterste...@gmail.com wrote: On Mon, May 12, 2014 at 4:53 PM, Michael Bayer mike...@zzzcomputing.comwrote: On May 12, 2014, at 2:30 PM, Sylvester Steele sylvesterste...@gmail.com wrote: the code here isn’t really showing me the

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-13 Thread Michael Bayer
On May 13, 2014, at 2:23 PM, Sylvester Steele sylvesterste...@gmail.com wrote: ODBC connection pooling setting did not matter. After the above change, code is running in both cases (ODBC connection pooling on or pooling off). Let me know if this is an issue and you need more info. OK so

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-12 Thread Sylvester Steele
the code here isn’t really showing me the nature of the two separate connections. They will be different unless you’re using “threadlocal” on the engine or pool and both are in the same thread. A simple comparison of the “raw” DBAPI connections to see if they are different objects will

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-12 Thread Michael Bayer
On May 12, 2014, at 2:30 PM, Sylvester Steele sylvesterste...@gmail.com wrote: the code here isn't really showing me the nature of the two separate connections. They will be different unless you're using threadlocal on the engine or pool and both are in the same thread. A simple

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-12 Thread Sylvester Steele
On Mon, May 12, 2014 at 4:53 PM, Michael Bayer mike...@zzzcomputing.comwrote: On May 12, 2014, at 2:30 PM, Sylvester Steele sylvesterste...@gmail.com wrote: the code here isn’t really showing me the nature of the two separate connections. They will be different unless you’re using

[sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-09 Thread Sylvester Steele
Hi, I am using sqlalchemy version 0.7.6 on Win 7. I am using sqlalchemy to execute raw SQL queries in parallel. Here is how I do it: eng = get_engine() #Threadsafe method to get engine raw_con = eng.connect().connection.connection raw_con.autocommit= True crsr = raw_con.cursor() res =

Re: [sqlalchemy] Concurrent raw sql execution in a multi-threaded application: Connection is busy with results for another hstmt error

2014-05-09 Thread Michael Bayer
On May 9, 2014, at 4:59 PM, Sylvester Steele sylvesterste...@gmail.com wrote: Hi, I am using sqlalchemy version 0.7.6 on Win 7. I am using sqlalchemy to execute raw SQL queries in parallel. Here is how I do it: eng = get_engine() #Threadsafe method to get engine raw_con =