[sqlalchemy] connect sql server

2008-01-13 Thread coder_gus
Hi, How can I connect to sql server with windows authentication using sqlalchemy? Using pymssql I haven't find a way. Thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups sqlalchemy group. To post to this

[sqlalchemy] Re: connect sql server

2008-01-13 Thread Paul Johnston
Hi, How can I connect to sql server with windows authentication using sqlalchemy? Using pymssql I haven't find a way. You have to use adodbapi or pyodbc - just specify no username/password and it just works. I don't think it's possible with pymssql. Paul

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Alexandre Conrad
Michael Bayer wrote: I dont see where the type element youre mentioning is present in this query. if Media points to Catalog, thats the end of the story - what is telling it about a CatalogChannel ? Okay, okay Mike and Svilen. Of course ! I was thinking we could figure out that if a

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Michael Bayer
On Jan 13, 2008, at 1:02 PM, Alexandre Conrad wrote: Okay, okay Mike and Svilen. Of course ! I was thinking we could figure out that if a media being attached to a Catalog of type channel, thus a CatalogChannel polymorphically speaking, would figure out that Media.query.join([catalog,

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Alexandre Conrad
Michael Bayer wrote: On Jan 13, 2008, at 1:02 PM, Alexandre Conrad wrote: Anyway, my inital issue according to the subject's title, is that: .filter(Catalog.c.id==CatalogChannel.c.id) generates the SQL query catalogs.id = catalogs.id rather than the expected catalogs.id =

[sqlalchemy] SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
Hi, I have a problem on using Decimal type along with SQLAlchemy, the decimal value could not be used for any computation after querying something with SQLAlchemy object. This is reproducable in my machine: import decimal from tbl import SBCITM pval = decimal.Decimal(decimal.Decimal('0.999') *

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Rick Morrison
I don't see how that code would produce those strings. At any rate, we'll need to see the SA schema definition, Jaimy. A small reproducing test case would be ideal, if you can. - Rick --~--~-~--~~~---~--~~ You received this message because you are subscribed to

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:36:14 AM, Rick Morrison wrote: Thanks for very fast response, I don't see how that code would produce those strings. At any rate, we'll need to see the SA schema definition, Jaimy. me neither, the decimal computation looks has nothing to do with sqlalchemy, but

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread jason kirtland
Jaimy Azle wrote: Hi, I have a problem on using Decimal type along with SQLAlchemy, the decimal value could not be used for any computation after querying something with SQLAlchemy object. This is reproducable in my machine: import decimal from tbl import SBCITM pval =

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Rick Morrison
Thanks. It's not clear from your first post exactly which column is in play, but all the numeric ones look large enough to not be distorting a value during a round trip. Let's try Jason's idea -- which db-api module are you using? --~--~-~--~~~---~--~~ You

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:46:15 AM, Jaimy Azle wrote: I will try to write some similar test case soon as this is really reproducable in my machine. Sadly, ...and strange. I can reproduce it on every part of my project source, but not on a simple test-case. Yet the problem is still there

[sqlalchemy] Re: SQLAlchemy change Decimal type operation behaviour

2008-01-13 Thread Jaimy Azle
On Monday, January 14, 2008, 8:51:44 AM, jason kirtland wrote: Could be something in the MSSQL db-api driver changing the decimal context- replacing the query code with the following gives me the same result: decimal.getcontext().prec = 1 Thanks, I will try with it. -- Salam,

[sqlalchemy] Re: filter() on inherited class doesn't point to the correct table

2008-01-13 Thread Michael Bayer
On Jan 13, 2008, at 2:33 PM, Alexandre Conrad wrote: Ahh, good to hear. It would feel more natural to me. We'd expect that CatalogChannel's table is catalog_channel_table, specially when we earlier set mapper(CatalogChannel, catalog_channel_table). Plus, using tables makes me have extra