[sqlalchemy] pyodbc issues

2009-04-17 Thread Michael Mileusnich
I am still having issues with pyodbc on Python 2.6. Platform: Windows XP SP3 32 bit Python 2.6 SQLAlchemy 0.5.3 pyodbc 2.1.3 When I use SQL-Lite, my tables are created and all my data is inserted. When I use MS SQL, the tables get created but my data will not insert. Here is my session:

[sqlalchemy] Re: Attempting to flush an item of type...

2009-04-17 Thread sandro dentella
the solution was to inherit setup.USER with a non-relative path fossati.models.client.User. I misinterpreted the words 'whose mapper...' and believed it was referencing Entry.user while it is referred to setup.USER. sandro --~--~-~--~~~---~--~~ You received this

[sqlalchemy] mapping class against arbitrary SQL expression

2009-04-17 Thread JanW
Hi, is there a way to map a class against an arbitrary SQL expression (read-only would be OK)? I can't find the correct way to define the selectable for the mapper. Example: this table: carside_table = Table( 'carside', metadata, Column('id', Integer, primary_key=True),

[sqlalchemy] Re: mapping class against arbitrary SQL expression

2009-04-17 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of JanW Sent: 17 April 2009 13:18 To: sqlalchemy Subject: [sqlalchemy] mapping class against arbitrary SQL expression Hi, is there a way to map a class against an arbitrary

[sqlalchemy] Re: mapping class against arbitrary SQL expression

2009-04-17 Thread JanW
OK, thanks, it does work if you make an alias on the select like this: s = select([left.c.car_id, left.c.temperature.label('left_temperature'), right.c.temperature.label('right_temperature')], from_obj=tables, whereclause=and_(left.c.side == 'left',

[sqlalchemy] SA pooling strategy and mysql has gone away

2009-04-17 Thread Ubestim
The mysql has gone away thing: mysql server timeout:60 (1 min) I read the source code of SA , and figure out the following solutions : sl1 -- set pool_size=1 and max_overflow #this will close all connections in pool,because the only conn

[sqlalchemy] Re: mapping class against arbitrary SQL expression

2009-04-17 Thread King Simon-NFHD78
-Original Message- From: sqlalchemy@googlegroups.com [mailto:sqlalch...@googlegroups.com] On Behalf Of JanW Sent: 17 April 2009 14:45 To: sqlalchemy Subject: [sqlalchemy] Re: mapping class against arbitrary SQL expression OK, thanks, it does work if you make an alias on

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Bayer
are you using FreeTDS ? there's a known issue with FreeTDS and SQLA 0.5. Michael Mileusnich wrote: I am still having issues with pyodbc on Python 2.6. Platform: Windows XP SP3 32 bit Python 2.6 SQLAlchemy 0.5.3 pyodbc 2.1.3 When I use SQL-Lite, my tables are created and all my data is

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Mileusnich
I do not recall having installed FreeTDS. On Fri, Apr 17, 2009 at 9:56 AM, Michael Bayer mike...@zzzcomputing.comwrote: are you using FreeTDS ? there's a known issue with FreeTDS and SQLA 0.5. Michael Mileusnich wrote: I am still having issues with pyodbc on Python 2.6. Platform:

[sqlalchemy] Re: SA pooling strategy and mysql has gone away

2009-04-17 Thread Michael Bayer
Ubestim wrote: The mysql has gone away thing: mysql server timeout:60 (1 min) I read the source code of SA , and figure out the following solutions : sl1 -- set pool_size=1 and max_overflow #this will close all connections in pool,because the

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Bayer
can you be more specific what will not insert means. Michael Mileusnich wrote: I do not recall having installed FreeTDS. On Fri, Apr 17, 2009 at 9:56 AM, Michael Bayer mike...@zzzcomputing.comwrote: are you using FreeTDS ? there's a known issue with FreeTDS and SQLA 0.5. Michael

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Mileusnich
I add my object to the session and flush. No insert happens. Works fine with SQL-LIte. I have have tried adding a commit also but that does not help. On Fri, Apr 17, 2009 at 10:02 AM, Michael Bayer mike...@zzzcomputing.comwrote: can you be more specific what will not insert means.

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Bayer
Michael Mileusnich wrote: I add my object to the session and flush. No insert happens. Works fine with SQL-LIte. I have have tried adding a commit also but that does not help. turn on your SQL echoing. see if INSERT is emitted. see if COMMIT is emitted, etc. On Fri, Apr 17, 2009 at

[sqlalchemy] Re: 0.5.2 seems to always roll back with mssql

2009-04-17 Thread Lukasz Szybalski
On Mar 25, 2:14 pm, Rick Morrison rickmorri...@gmail.com wrote: Yep, same here. ..on my mssql 2005, I tried this query batch: set implicit_transactions on go select 'After implicit ON', @@trancount exec sp_datatype_info go select 'After query w/implicit', @@trancount begin

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Trier
The SERVERS table doesn't exist according to the trace. Did you create your tables? Sent from mobile On Apr 17, 2009, at 7:31 PM, Michael Mileusnich justmike2...@gmail.com wrote: C:\Dev\pyschedpython createservers.py D:\Python26\lib\site-packages\sqlalchemy-0.5.3-py2.6.egg\sqlalchemy

[sqlalchemy] Re: pyodbc issues

2009-04-17 Thread Michael Mileusnich
Actually I made a mistake in running some of these py files manually. The tables exist now and this is what I receive: 2009-04-17 19:04:59,780 INFO sqlalchemy.engine.base.Engine.0x...1230 () 2009-04-17 19:04:59,796 INFO sqlalchemy.engine.base.Engine.0x...1230 COMMIT C:\Dev\pyschedpython