Connections

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Connections

Post by John » Fri 12 Nov 2004 21:42

Hi;

We have a .NET application that is calling stored procedures in an Oracle 8i database. When the Oracle developers make changes and recompile objects/stored procedures in the database subsequent calls from our application fail and return the error "ORA... statement handle not executed." If we restart our application then everything works fine. This led us to believe that maybe we are not closing all of our connections but we reviewed our code and everything looks fine. Does anyone have any ideas as to why we have to re-start our application after changes are made on the database?

Thank you!!!


John

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Re: Connections

Post by Oleg » Mon 15 Nov 2004 15:31

Connections don't close if you use connection pooling.
You can set pooling parameter to false in your connection string to disable pooling.
At the next version of OraDirect .NET we'll add a new feature of clearing connection pool by OracleConnection.ClearPool method.

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Re: Connections

Post by John » Mon 15 Nov 2004 17:50

Hi Oleg;

That should work; I will give it a try. However, it seems there will be a price to pay in terms of performance... I guess that is just a trade-off that we will have to live with.

Thanks!


John

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Re: Connections

Post by John » Mon 15 Nov 2004 22:03

Yes, disabling the connection pool corrects the issue and the performance hit does not seem too bad.

FYI You can disable the connection pool by adding the following to your connection string:

pool=false;

Oleg
Devart Team
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Re: Connections

Post by Oleg » Tue 16 Nov 2004 08:55

You've made a typo, to disable the connection pool you should add the next to the connection string:
pooling=false;

John
Posts: 25
Joined: Fri 12 Nov 2004 21:18
Location: Durham, NC, USA

Re: Connections

Post by John » Tue 16 Nov 2004 19:53

Yes, good catch - thank you for the correction!

Post Reply