Error 3146 extracting from Oracle on XP

Positive Parrot

New Member
Joined
Jan 16, 2004
Messages
35
All,

We have just moved the following Excel VBA code from NT4 (Excel 97) where it worked fine to XP (Excel 2003) where I am getting the error message at the Set conOra line

Run time error 3146: ODBC call failed

The Oracle ODBC on the new XP machine seems to have been set up OK and I can log onto Oracle from outside Excel successfully.

Has anybody any ideas how I can narrow the problem down?

Code:
Dim wrkOra As Workspace
Dim conOra As Connection

Set wrkOra = CreateWorkspace("Oracle Workspace", "", "", dbUseODBC)

Application.StatusBar = "Retrieving Site data from Oracle..."
Set ws = ActiveWorkbook.Worksheets("Site Data")

Set conOra = wrkOra.OpenConnection( _
    Name:="Oracle Connection", _
    Options:=dbDriverComplete, _
    ReadOnly:=True, _
Connect:="ODBC;DSN=PRODCORP;DATABASE=Oracle73;UID=dluser;PWD=datalens")

Many Thanks,

PP
 

Some videos you may like

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,432
Hi PP

I'm not sure if this will help but we had a very similar question in the Access forum recently - have a look at the links I provided in this thread. Hopefully something there might help.

Andrew :)
 

Watch MrExcel Video

Forum statistics

Threads
1,118,451
Messages
5,572,193
Members
412,447
Latest member
immy
Top