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
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

Andrew Fergus

MrExcel MVP
Joined
Sep 9, 2004
Messages
5,449
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
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 :)
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,998
Messages
5,834,808
Members
430,323
Latest member
Regash

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top