Avatar of Russ Suter
Russ Suter
 asked on

Connect Timeout connection string property doesn't work with Oracle

I'm trying to set the connection timeout property for an OleDbConnection object. I read in docs that the property is read-only but can be set by adding a parameter to the connection string. My connection string looks like this:
Provider=MSDAORA;Data Source=[myTNSEntry];User ID=[myUser];Password=[myPassword];Connect Timeout=30;

Open in new window

Inspecting the OleDbConnection object reveals that the connection timeout is, in fact 30 seconds which is good. Unfortunately, as soon as I try to open the connection I get an OleDbException error saying "Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done." If I do not add the "Connect Timeout=30" argument in the connection string then the ConnectionTimeout property of the OleDbConnection object is the default 15 seconds but the Open() method works without errors. Am I missing something or am I just running into some kind of limitation with OleDb or with the Oracle provider?
DatabasesOracle Database* OleDb

Avatar of undefined
Last Comment
slightwv (䄆 Netminder)

8/22/2022 - Mon
slightwv (䄆 Netminder)

>>or with the Oracle provider?

You aren't using the Oracle Provider.  MSDAORA is the Microsoft OLE DB Provider for Oracle.

Use the native Oracle provider.

I agree. MSDAORA was a misguided attempt to fix something which is not broken, a long time ago. It causes more issues than it fixes, so skip it and use the Oracle .NET provider, which you need to have installed anyway.
slightwv (䄆 Netminder)

If you can go with the .Net provider I would use the new Managed Driver.  No Client install necessary for it.

To clarify:  You don't have to install the .Net provider to install the OleDB driver.
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
Russ Suter

I'll look into that. Do you happen to know the name of the .NET provider I should be looking for?
slightwv (䄆 Netminder)

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question