[sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Werner
Hi, I am using the above to set the user language and I am sure this worked for me, but it doesn't any more, in the mean time I upgraded to 0.8.1 (was on 0.7.8) and I wonder where things changed. In a simple test like this it still works: session.execute(select

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Werner
On 29/04/2013 13:29, Werner wrote: Hi, I am using the above to set the user language and I am sure this worked for me, but it doesn't any more, in the mean time I upgraded to 0.8.1 (was on 0.7.8) and I wonder where things changed. In a simple test like this it still works:

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Mauricio de Abreu Antunes
I know my question is very weird, but Have you ever tried the same SQL string in the firebird console? 2013/4/29 Werner werner.bru...@sfr.fr On 29/04/2013 13:29, Werner wrote: Hi, I am using the above to set the user language and I am sure this worked for me, but it doesn't any more, in

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Werner
On 29/04/2013 15:05, Mauricio de Abreu Antunes wrote: I know my question is very weird, but Have you ever tried the same SQL string in the firebird console? Not weird at all. I use IBExpert for this and when I do it in a session all works fine. Just to expand, all this is used by views for

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Werner
Hi, I think I fixed it but don't understand at all why my change would fix it. getcont = select rdb$get_context('USER_SESSION', 'LANGUAGE_ID') \ from rdb$database setcont = select rdb$set_context('USER_SESSION', 'LANGUAGE_ID', %s) \ from

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Michael Bayer
I don't know what wx.GetApp().ds is, but a commit, assuming this is a Session, will return the current connection back to the connection pool, and any session changes stay with that connection. Using the Session again will pull up a potentially different connection. if you want to make

Re: [sqlalchemy] SA and Firebird RDB$SET/GET_CONTEXT

2013-04-29 Thread Werner
Hi Michael, On 29/04/2013 19:58, Michael Bayer wrote: I don't know what wx.GetApp().ds is, but a commit, assuming this is a Session, will return the current connection back to the connection pool, and any session changes stay with that connection. Using the Session again will pull up a