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?
LVL 22
Russ SuterSenior Software DeveloperAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
>>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.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
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) Commented:
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.
Russ SuterSenior Software DeveloperAuthor Commented:
I'll look into that. Do you happen to know the name of the .NET provider I should be looking for?
slightwv (䄆 Netminder) Commented:
Look for ODP.Net.

The ODP.Net drivers are here:
https://www.oracle.com/technetwork/topics/dotnet/index-085163.html

The Core driver is new to me so I've not used it.  It sounds really good with a single DLL.  I've used the Managed Driver and was VERY HAPPY with it.  It was the first s.Net driver that didn't need an Oracle Client install.  Sounds like the Core driver doesn't either.

I always downloaded the XCopy version and just copied the DLL I needed into my projects.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Databases

From novice to tech pro — start learning today.