Subject Re: [firebird-support] Re: Delphi dbExpress and Threads
Author Martijn Tonies
> > If you pass an owner, then yes, I think you need to create them all
> > in the main thread.
>
> I don't set the owner, but I'll try to create all in the main thread
> anyway.
>
>
> > > What about queries? Should queries always be
> > > recreated by a thread?
> >
> > No.
>
> To be clear: queries can be created/prepared in thread A, left there
> when my DB object is released back in my pool and later be reused in
> thread B?

Yes. As long as each query uses its own connection and each connection
is only in use by a single thread at a time.

>This will really work? What about transactions?

See above. Transactions are tied to a connection.

With regards,

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, Oracle & MS SQL
Server
Upscene Productions
http://www.upscene.com