VB6 connection to Oracle DB with Instant_Client driver, not Oracle XE driver

I have a Visual Basic 6 app that currently connects fine to an Oracle database using the Oracle XE driver:

Set MyConn = New ADODB.Connection
MyConn.Open "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=Ora.mydomain.com)(PORT=1000)))(CONNECT_DATA=(SID=SVR)(SERVER=DEDICATED)));User Id=myuser;Password=mypassword;"

However, I need to change the program to use the Oracle Instant Client driver instead, and I am unable to get it to work. I've tried multiple formats but they all fail. Also, I do not have access to the user's TNSnames.ora file on their PC, so the connection string can not reference the user's TNS settings.

Any help would be greatly appreciated. Thanks.
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:
The OLEDB drivers are now part of the ODAC download.

I believe you no longer need the Instant Client as part of this download/install.

I would suggest the XCopy version:

Once you unzip the download, there is a readme type file that tells you how to install just the OLEDB drivers.
Alexander Eßer [Alex140181]Software DeveloperCommented:
I suppose you have to create multiple listeners, as shown here:

So, you're able to work with different Oracle homes...
slightwv (䄆 Netminder) Commented:
Not where listeners enter into the picture?  This is about a Client VB6 app using OLEDB to connect to a remote database server.  That is unless I'm completely missing the question...
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

tcloudAuthor Commented:
No, I don't think this is a listener issue. It works fine now the Oracle XE driver. I will use the same listener, but just a different client driver.

We want to stop using the Oracle XE driver because, to our knowledge, you need to install the full XE client database in order to use the XE driver.
slightwv (䄆 Netminder) Commented:
XE doesn't have a driver itself per say.  It installs native drivers as part of it's install.

Yes, I believe XE is a complete install or nothing but it's been a while since I installed it.

Check the ODAC drivers I mentioned above.
tcloudAuthor Commented:
Thanks, I'll try the ODAC.
tcloudAuthor Commented:
I can now connect to the database, but only if I reference the user's TNSnames.ora file. This works:

MyConn.Open "driver={Oracle in instantclient_11_2};DBQ=PROD;User Id=myuser;Password=mypassword;"

Is it possible to connect directly without using the TNS file?

slightwv (䄆 Netminder) Commented:
>>driver={Oracle in instantclient_11_2}

This looks like the instant client install.

If the ODAC OLEDB install was successful, you should be able to use the same connect string you posted.

Double check the install.

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
tcloudAuthor Commented:
Fast and responsive solution. Was right on. I was just slow in implementing. Thanks so much for your help!
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
Visual Basic Classic

From novice to tech pro — start learning today.