Re: [sqlalchemy] Re: Cannot delete SQLite '.db' using os.remove

2010-03-09 Thread Andrija Zarić
Your example runs fine on Ubuntu 9.04, with python 2.6.2 and SQLAlchemy-0.6beta1. On 9 March 2010 05:49, Lynton Grice lyntongr...@gmail.com wrote: Hi Michael, Can you paste the following code into your editor and try it out? Can you tell me what I would need to do to close the connections

Re: [sqlalchemy] Re: Cannot delete SQLite '.db' using os.remove

2010-03-09 Thread Michael Bayer
Lynton Grice wrote: Hi Michael, Can you paste the following code into your editor and try it out? Can you tell me what I would need to do to close the connections in this case? I think when using SQLite, your best bet is to use NullPool in any case which will eliminate the issue and even

Re: [sqlalchemy] Performance Difference

2010-03-09 Thread Michael Bayer
Paulo Aquino wrote: Are there performance difference between the following line of codes. a. for instance in Query: print instance.id b. for instance in Query.all(): print instance.id b. is equivalent to list(query). Differences are negligible since the full results are

[sqlalchemy] dealing with server restarts

2010-03-09 Thread Chris Withers
Hi All, We had to restart our MySQL server recently. All our SQLAlchemy-based client apps then threw an error like the following: File /usr/lib/python2.5/site-packages/SQLAlchemy-0.5.8-py2.5.egg/sqlalchemy/engine/base.py, line 931, in _handle_dbapi_exception raise

Re: [sqlalchemy] dealing with server restarts

2010-03-09 Thread Michael Bayer
Chris Withers wrote: Hi All, We had to restart our MySQL server recently. All our SQLAlchemy-based client apps then threw an error like the following: File /usr/lib/python2.5/site-packages/SQLAlchemy-0.5.8-py2.5.egg/sqlalchemy/engine/base.py, line 931, in _handle_dbapi_exception

[sqlalchemy] Re: Cannot delete SQLite '.db' using os.remove

2010-03-09 Thread Lynton Grice
Hi there, Thanks for the clarity, much appreciated ;-) Lynton On Mar 9, 5:25 pm, Michael Bayer mike...@zzzcomputing.com wrote: Lynton Grice wrote: Hi Michael, Can you paste the following code into your editor and try it out? Can you tell me what I would need to do to close the

[sqlalchemy] can not operate in a closed cursor

2010-03-09 Thread Udara Liyanage
i got this error when i was fallowing the tutorial metadata.create_all(engine) what is the reason for this? what should i do to overcome this? thank in advance. -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to

[sqlalchemy] Issue with cursor usage in zxjdbc dialect for Oracle

2010-03-09 Thread Tahir Butt
I've been getting java heap size errors when reading a lot of rows returned from a query via sqlalchemy with a jython script. I isolated the problem to the way sqlalchemy creates a cursor from zxjdbc. The particular function in question is the Oracle_zxjdbcExecutionContext.create_cursor() in

[sqlalchemy] Re: Issue with cursor usage in zxjdbc dialect for Oracle

2010-03-09 Thread Tahir Butt
Sorry the zxjdbc test should read: cursor = db.cursor(1) cursor.execute(query) for r in cursor: pass -- You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this group, send email to sqlalch...@googlegroups.com. To unsubscribe from this

[sqlalchemy] Re: Issue with cursor usage in zxjdbc dialect for Oracle

2010-03-09 Thread Tahir Butt
A final comment on this issue. oracle.jdbc.driver.OracleDriver is considerably faster than zxjdbc in my case where I'm reading many rows. On Mar 9, 1:51 pm, Tahir Butt tahir.b...@gmail.com wrote: Sorry the zxjdbc test should read: cursor = db.cursor(1) cursor.execute(query) for r in cursor:

[sqlalchemy] Decimal() with Oracle

2010-03-09 Thread Kent
I've got a column defined as this: Column(cost, Numeric, nullable=False) In Oracle, it seems I can't take advantage of the Decimal() class. I get rounding errors as if using float instead of Decimal, see output for Oracle vs. Postgres. Oracle 8i (use_ansi=False):

Re: [sqlalchemy] Re: Issue with cursor usage in zxjdbc dialect for Oracle

2010-03-09 Thread Michael Bayer
Tahir Butt wrote: A final comment on this issue. oracle.jdbc.driver.OracleDriver is considerably faster than zxjdbc in my case where I'm reading many rows. On Mar 9, 1:51 pm, Tahir Butt tahir.b...@gmail.com wrote: Sorry the zxjdbc test should read: cursor = db.cursor(1)

Re: [sqlalchemy] Decimal() with Oracle

2010-03-09 Thread Michael Bayer
Kent wrote: I've got a column defined as this: Column(cost, Numeric, nullable=False) In Oracle, it seems I can't take advantage of the Decimal() class. I get rounding errors as if using float instead of Decimal, see output for Oracle vs. Postgres. decimal rounding errors have been

Re: [sqlalchemy] can not operate in a closed cursor

2010-03-09 Thread Michael Bayer
Udara Liyanage wrote: i got this error when i was fallowing the tutorial metadata.create_all(engine) what is the reason for this? what should i do to overcome this? this kind of question requires: 1. what database backend and driver are you using 2. what version of SQLAlchemy are you using