Re: [sqlalchemy] cumulative sum of 1-many table columns.

2012-08-07 Thread jeetu
Just ignore the above post. I am able to get it working for adding new artist with albums. But I am still getting some problems while updating the albums's sales values from Turogears/toscawidgets2 interface. Let me bring the problem to sqlalchemy level then I will post it further (if the

[sqlalchemy] MSSQL, how to make cross-database joins within a single server

2012-08-07 Thread Peder Chr
Hello, I am a somewhat new but so far very happy user of SQL Alchemy. Today, however, I have run into a problem that has stopped me cold. I need to join two tables that reside on the same MS SQL server but in two different databases. This is trivial to do in MS SQL Server Management Studio,

Re: [sqlalchemy] cumulative sum of 1-many table columns.

2012-08-07 Thread jeetu
Just one minor update for future reference, We have to add the None checking condition in _update_artist method as well for the update to happen properly in the web application. But I was unable to produce the problem in the text sqlalchemy file that I have posted in the pastebin.

Re: [sqlalchemy] MSSQL, how to make cross-database joins within a single server

2012-08-07 Thread Michael Bayer
On Aug 7, 2012, at 7:57 AM, Peder Chr wrote: But this does not work in SQL Alchemy - the trivial attempt of specifying the 'schema' parameter of the 'Table' constructor as 'databasename.schemaname' instead of just 'schemaname', using a DSN that does not specify a database name, results in

Re: [sqlalchemy] MSSQL, how to make cross-database joins within a single server

2012-08-07 Thread Michael Bayer
On Aug 7, 2012, at 11:39 AM, Michael Bayer wrote: On Aug 7, 2012, at 7:57 AM, Peder Chr wrote: But this does not work in SQL Alchemy - the trivial attempt of specifying the 'schema' parameter of the 'Table' constructor as 'databasename.schemaname' instead of just 'schemaname', using a

[sqlalchemy] MySQL Multithreaded app and 'MySQL has gone away' errors

2012-08-07 Thread Lucas Manfield
Hello, I've been unable to shake 'MySQL has gone away' errors in my application. Here's my setup: It's a pretty classic REST API built on top of Flask and MySQL with a scoped_session engine = create_engine('mysql+mysqldb:/', convert_unicode=True,

Re: [sqlalchemy] MySQL Multithreaded app and 'MySQL has gone away' errors

2012-08-07 Thread Michael Bayer
On Aug 7, 2012, at 6:27 PM, Lucas Manfield wrote: Hello, I've been unable to shake 'MySQL has gone away' errors in my application. Here's my setup: It's a pretty classic REST API built on top of Flask and MySQL with a scoped_session engine =

Re: [sqlalchemy] Error using mssql+pymssl on a Sybase database

2012-08-07 Thread Firass Asad
My rationale for using mssql+pymssql was because it connects directly using C API instead of ODBC. I could simply connect using the freetds_name instead of installing ODBC drivers. I tried installing version 0.40 of python-sybase for use with FreeTDS. I was able to connect and run a query

Re: [sqlalchemy] Error using mssql+pymssl on a Sybase database

2012-08-07 Thread Michael Bayer
On Aug 7, 2012, at 7:39 PM, Firass Asad wrote: My rationale for using mssql+pymssql was because it connects directly using C API instead of ODBC. I could simply connect using the freetds_name instead of installing ODBC drivers. I tried installing version 0.40 of python-sybase for use

Re: [sqlalchemy] Error using mssql+pymssl on a Sybase database

2012-08-07 Thread Firass Asad
I have things working using sybase+pyodbc, but I'll definitely forward my error message to the python-sybase folk. Thanks again! Firass. On Tuesday, August 7, 2012 5:00:35 PM UTC-7, Michael Bayer wrote: On Aug 7, 2012, at 7:39 PM, Firass Asad wrote: My rationale for using mssql+pymssql was