how to pass check_same_thread = False

334 views
Skip to first unread message

dasacc22

unread,
Oct 12, 2009, 3:43:48 PM10/12/09
to SQLElixir
Hi,

Im trying to figure out how to pass check_same_thread = False to my
sqlite database stored via file. I tried

metadata.bind.check_same_thread = False

to no effect.

Thanks,
Daniel

Gaetan de Menten

unread,
Oct 13, 2009, 7:54:36 AM10/13/09
to sqle...@googlegroups.com
On Mon, Oct 12, 2009 at 21:43, dasacc22 <dasa...@gmail.com> wrote:

> Im trying to figure out how to pass check_same_thread = False to my
> sqlite database stored via file. I tried
>
> metadata.bind.check_same_thread = False
>
> to no effect.

You probably need to use create_engine explicitly, as in:

engine = create_engine(uri)
metadata.bind = engine

or, you might be able to pass the arguments within the connection string. See:

http://www.sqlalchemy.org/docs/05/dbengine.html#custom-dbapi-connect-arguments

--
Gaëtan de Menten
http://openhex.org

dasacc22

unread,
Oct 13, 2009, 10:41:13 PM10/13/09
to SQLElixir
amazing, this worked for me

elixir.metadata.bind = "sqlite:///www.sqlite?check_same_thread=False"

thanks for that link in the docs, ive spent forever reading all the
wrong areas over there

On Oct 13, 7:54 am, Gaetan de Menten <gdemen...@gmail.com> wrote:
> On Mon, Oct 12, 2009 at 21:43, dasacc22 <dasac...@gmail.com> wrote:
> > Im trying to figure out how to pass check_same_thread = False to my
> > sqlite database stored via file. I tried
>
> > metadata.bind.check_same_thread = False
>
> > to no effect.
>
> You probably need to use create_engine explicitly, as in:
>
> engine = create_engine(uri)
> metadata.bind = engine
>
> or, you might be able to pass the arguments within the connection string. See:
>
> http://www.sqlalchemy.org/docs/05/dbengine.html#custom-dbapi-connect-...
>
> --
> Gaëtan de Mentenhttp://openhex.org
Reply all
Reply to author
Forward
0 new messages