odac 7.20 and neverconnect options

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
saitsari
Posts: 8
Joined: Tue 12 Jul 2011 14:03
Location: turkiye
Contact:

odac 7.20 and neverconnect options

Post by saitsari » Tue 12 Jul 2011 14:22

hi,
1.I try to use 7.20, but there is no neverconnect option at design time.
but I see on code. How can I use neverconnect option.
2.I used previous version odac 5.80, then upgrade to 7.20
But Session on Toraquery start problem. Because session is not set on toraquery.But there is no problem on 5.80
7.20 does not start toraquer and rises error there is no owner etc.
How can I correct this problem except correct session each by each.

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

Post by AlexP » Wed 13 Jul 2011 07:59

Hello,

We left the NeverConnect property for compatibility with the previous versions, also we introduced a new KeepDesignConnected property that is responsible for this behaviour. You should set this property to False to obtain the needed behaviour.

We did not change the behaviour of components (TOraQuery, TOraTable, etc.). If you define the Session property of these components explicitly, the default session will be used for these components.

saitsari
Posts: 8
Joined: Tue 12 Jul 2011 14:03
Location: turkiye
Contact:

Post by saitsari » Wed 13 Jul 2011 14:21

hi,
1.I think neveconnect:=true equal to keepdesignconnect:=false?
2.in my project oracle session is defined DM form.
session property of toraqueries is not defined at design time. this propert is blank. In this case, project run correctly. it uses default session.
when I upgraded from 5.x to 7.2, query component that session property is empty rises error "there is no owner " etc.
if I correct session property ('session:=dm.oracle'),it runs correctly.
But there 200 form , ~800 design time query and ~200 runtime query in my project.

best regards

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

Post by AlexP » Thu 14 Jul 2011 07:24

Hello,

The neveconnect and keepdesignconnect options are not the same, because now neveconnect is not saved in dfm, and even if you set it to True in the runtime, you will not get the required result, because the connection was already set. That's why you need to use the keepdesignconnect option.

I cannot reproduce the problem you described – even if OraSession is located in DataModule and OraQuery is created in runtime in another module and it does not have a pointer to DataModule.OraSession, everything works correctly and the default session is used. Please try to compose a small sample demonstrating the problem and send it to alexp*devart*com.

Post Reply