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

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
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 :)
 
Upvote 0

Forum statistics

Threads
1,214,585
Messages
6,120,388
Members
448,957
Latest member
Hat4Life

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
Back
Top