ODAC 6.90.0.57-bcb 2010 - cannot catch ORA-03114 - 10.2.0.3

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

ODAC 6.90.0.57-bcb 2010 - cannot catch ORA-03114 - 10.2.0.3

Post by albourgz » Thu 03 Nov 2011 09:34

Hi,

I have a business-critical application that has to run 24/24, 7/7, and that should be able to warn (and wait then retry) when db is down or network is down.
I would like to catch a connection failure, I am NOT using Direct mode.
Client is win vista 32 bits ultimate, oracle client 10.2.0.3.0.
Server is a free 10g xe on windows xp pro sp 3.

I have a global TOraSession, connection is ok at startup.
I have a Timer event that checks (when idle, every 30 seconds) that the connection is fine, using Ping() method. Even if Ping throws an exception, TOraSession's Connected property is still true.
=>When ping throws an exception, I would like to set the Connected property to false (as the Connected property is used to check connection at lots of places in the code).
However, as soon as I get a ORA-03114, the exception is shown... but is not catched!

To reproduce: put a TOraSession (named m_dbOurDB) on a form, with valid connection credentials, and set connected to true. Put a ttimer event (active every 30 seconds) and put this code in it:

Code: Select all

{ 
bool bCloseConnection=false;
try {
    m_dbOurDB->Ping();
    }
catch(...) { bCloseConnection=true; }

if (m_dbOurDB->Connected && bCloseConnection)
    try {
        m_dbOurDB->Close();
    }
    catch(...) {}
}
Then
1. start the program.
2. remove network cable from server to trigger a network failure.

When timer triggers, the ORA-03114 happens and cannot be catched. Connected property cannot be set to false.

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

Post by AlexP » Thu 03 Nov 2011 11:03

Hello,

I can not reproduce the problem.
Please specify the following information:
- the exact version of ODAC;
- the name and exact version of your IDE.

albourgz
Posts: 160
Joined: Wed 06 May 2009 12:17
Location: belgium

versions

Post by albourgz » Thu 03 Nov 2011 14:50

Odac 6.90.0.57
c++ builder 2010 professional
v14.0.3615.26342
(update pack 5 - database pack)

I made extra tests : exceptions are raised when setting Connected to false, if an Alerter is active and network cable has been removed.

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

Post by AlexP » Fri 04 Nov 2011 09:47

Hello,

I still cannot reproduce the problem.
Download the latest version of ODAC (8.0.2) and try to reproduce the problem using this version. If the error persists, please send a small application demonstrating this problem to alexp*devart*com.

Post Reply