Oracle sessions and delphi threads

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
amoroder
Posts: 30
Joined: Sun 12 Sep 2010 11:33

Oracle sessions and delphi threads

Post by amoroder » Wed 29 Jan 2014 07:33

Hello,

I am writing a windows service that should do different jobs in threads. All the threads have to connect to the same oracle database and schema.
Is it possible to work with only one session or do I have to create a session for every thread ?

Thanks
Andreas

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Oracle sessions and delphi threads

Post by AlexP » Wed 29 Jan 2014 08:34

Hello,

Full thread-safety is really guaranteed in the OCI mode, we recommend to use a separate connection for each thread in the Direct mode

jfudickar
Posts: 202
Joined: Fri 10 Mar 2006 13:03
Location: Oberursel / Germany

Re: Oracle sessions and delphi threads

Post by jfudickar » Sun 02 Feb 2014 12:31

What does it mean : full thread safety?
My experience show that it's not possible to have to sql statements executed at the same time.

Regards
Jens

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Oracle sessions and delphi threads

Post by AlexP » Wed 07 May 2014 12:41

You can find samples of work with threads in ODAC in the demos: ..\Devart\ODAC for RAD Studio XE\Demos\OdacDemo\Threads\

Post Reply