Trouble with several sessions and sesstings Options.Net in runtime

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Trouble with several sessions and sesstings Options.Net in runtime

Post by Legion » Thu 21 Jul 2005 09:28

I have main form with session and MDI-child forms with child session
In design time Options.Net=True for all sessions (main and child)
In runtime Options.Net=False for main session
Then create child form, params of main session (connect string and Net) assign to child session
Then create child form, all existent sessions (main and child) are closed.

P.S. I send mail with test project to support

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 22 Jul 2005 07:07

ODAC doesn't support two modes (Net and native) simultaneously, in previous ODAC versions if you change Net option state then all sessions in IDE change their Net state too, now we change this behaviour and you can set a different state of Net option to TOraSession objects, but it doesn't mean that you can use "Net" and "native" modes simultaneously. The feature to use different state of Net option at design-time was added for those users who want to load several projects in IDE, where some projects use Net option and the other don't.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Fri 22 Jul 2005 09:39

But why it occurs in runtime? I think, if first created session nas Net=True, then ODAC engine must set Net to True for all next created sessions without closing prveviously created and opened sessions , and vice versa.

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Fri 22 Jul 2005 13:53

As to run-time created sessions you are right, and I can see such behaviour on my test samples. Maybe you have some exotical case, so please send us small demo project that demonstrates your problem to ODAC support address.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Fri 22 Jul 2005 14:12

I send demo project

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Wed 27 Jul 2005 11:00

I couldn't reproduce the problem with your demo, please specify your ODAC version.

Legion
Posts: 30
Joined: Wed 01 Jun 2005 15:38
Location: Russia

Post by Legion » Wed 27 Jul 2005 11:22

Delphi 6
ODAC 5.55.0.19

Alex
Posts: 655
Joined: Mon 08 Nov 2004 08:39

Post by Alex » Mon 01 Aug 2005 13:00

I reproduced your problem with MDI application and different Net option settings.
The main cause of such ODAC behaviour is that it can't use Net and native connections simultaneously. When you create a new MDI child form, you implicitly create new NET session, so not all Net sessions are disconnected - that is your problem. As a decision of this problem I could suggest you to create MDI Child sessions at run-time.

Post Reply