Run-time error 2147467259 (80004005)

Hi,

I have written a macro, that gets connect to a database run a query and copy the recordset in to an excel. Its working fine in my PC and when I tried to run in others PC its give the above error.

This the code that I have written to connect to DB:

Dim oconn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strSQL, strsql1, As String
strSQL = " select * from srprod_strategic_all_val"
strsql1 = "select * from srprod_strategic_all_Inval"

Set oconn = New ADODB.Connection

oconn.Open "Provider=msdaora;Data Source=CALPRO.WORLD;User Id=PRESTAGE;Password=pre#pr33;"
/* its giving error at the above line when I run in others PC*/

rs.CursorType = adOpenStatic
rs.CursorLocation = adUseClient
rs.LockType = adLockOptimistic
rs.Open strSQL, oconn, , , adCmdText

The total eoor message is:

Run-time error 2147467259 (80004005)
The Oracle(tm) Client and Networking Components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3.3(or greater) Client Software Installation.

Provider is unable to function until these components are installed.

Could anyone please help me in resolving this?

Thanks,
Pramod.
pnadakuditiAsked:
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.

Rory ArchibaldCommented:
You cannot access an Oracle database unless you have the Oracle network client tools installed (as the message says).
0
pnadakuditiAuthor Commented:
Hi,

Oracle network client tools?
I have Oracle10g installed in my PC and the other PC in which I have run the macro as have the same.

Before writing the macro, I have enabled Microsoft ActiveX Data Objects 2.6 Library. this is only the change I have done.. and this is also enabled in others PC.

Thanks,
Pramod.
0
Rory ArchibaldCommented:
I can only assume that you did not do a full install on one of the machines then. Without the client tools installed, you can't access an Oracle db. I don't know what they are called in version 10 but in 8 it was called Net8 I think.
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

pnadakuditiAuthor Commented:

ok,, according to you its fully installed in my PC as its running fine on mine and not installed fully on the other PC.

But the other PC is have informatica too and they are able to access oracle throgh Informatica
0
Rory ArchibaldCommented:
Perhaps they use a different provider. There are different connection strings depending on the provider being used - see this page for examples:
http://www.connectionstrings.com/oracle
0
pnadakuditiAuthor Commented:
I'm using the below format in my code as specified in the document. do you mean the same msdora provider is not being used in other PC? if so, How can I check whether the other PC has this provider or not?

Standard security
This connection string uses a provider from Microsoft.

Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
0
Rory ArchibaldCommented:
What I mean is that the Informatica add-in may be using a different provider, or it may use another means altogether of connecting (such as DCOM). If your code is not working on another machine, then the two do not appear to have the same installation of the software. (I have read that the MS Provider for Oracle may not work with all Oracle clients, but if you are using the same software on both, it should work on both or fail on both.)
0
pnadakuditiAuthor Commented:
yeah.. I agree. Could you please let me know how can I check the Oracle diver and provider that other PC is using?
0
Rory ArchibaldCommented:
The provider it's using is the one you specify in your code - the Microsoft one.
0

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
pnadakuditiAuthor Commented:
useful to debug
0
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.