Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Oracle Connection Problem

I am attempting to connect to an Oracle table.

When I record a macro to connect, it generates the following code.

With ActiveSheet.QueryTables.Add(Connection:=Array(Arra y( _

"ODBC;DSN=PRG_OPS;UID=YYYYYY;PWD=XXXXXXXX;DBQ=EDSS P.WORLD;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=1 0;LOB=T;RST=T;GDE=F;FRL=F;BAM=" _
)

I converted this to:
strCnn = "Provider=OraOLEDB.Oracle.1;Password=XXXXXXXXX;Use r ID=YYYYYYY;
Server=EDSSP.WORLD;Persist Security Info=True"

I am guessing that perhaps the "OraOLEDB.Oracle.1". What and how do I know
what to place in this field.

I am getting the following error:

-2147467259: ORA-12560: TNS:protocol adapter error

The system generated macro connects to the Database just fine.
TNSPing works just fine, so there is something wrong with how I have
constructed my connection string.


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Oracle Connection Problem


"Jim Heavey" wrote in message
...
I am attempting to connect to an Oracle table.

<.......

The system generated macro connects to the Database just fine.
TNSPing works just fine, so there is something wrong with how I have
constructed my connection string.


Hi Jim,

A good way of creating and testing connection strings is to right-click on
your desktop and choose New Text Document. Rename the new document to
ConnString.udl (or anything dot udl, really). Widows will give you the
patronising warning about changing the filename extension. Click Yes to
confirm the change.
The new file will now have a new icon. Double-click the icon and the Data
Link Properties dialog will appear. Set up your database connection in there
and hit the Test Connection button to ensure that the connection works OK.

Click OK to close the dialog. Now open the .udl file with notepad (or a
proper text editor ;-) and there you will find your connection string.

HTH

Robert


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default Oracle Connection Problem

Jim,

See my examples in your previous thread.

Tim

--
Tim Williams
Palo Alto, CA


"Jim Heavey" wrote in message
...
I am attempting to connect to an Oracle table.

When I record a macro to connect, it generates the following code.

With ActiveSheet.QueryTables.Add(Connection:=Array(Arra y( _


"ODBC;DSN=PRG_OPS;UID=YYYYYY;PWD=XXXXXXXX;DBQ=EDSS P.WORLD;DBA=W;APA=T;EXC=F;
FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F; BAM=" _
)

I converted this to:
strCnn = "Provider=OraOLEDB.Oracle.1;Password=XXXXXXXXX;Use r ID=YYYYYYY;
Server=EDSSP.WORLD;Persist Security Info=True"

I am guessing that perhaps the "OraOLEDB.Oracle.1". What and how do I

know
what to place in this field.

I am getting the following error:

-2147467259: ORA-12560: TNS:protocol adapter error

The system generated macro connects to the Database just fine.
TNSPing works just fine, so there is something wrong with how I have
constructed my connection string.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Oracle database connection b_r Excel Programming 3 February 3rd 06 08:21 PM
Changing Oracle connection from DSN to DSN-Less Red[_4_] Excel Programming 3 October 7th 05 10:42 AM
XL - Oracle connection Error parthi4u Excel Discussion (Misc queries) 0 September 14th 05 08:45 PM
XL - Oracle Connection error parthi4u Excel Programming 0 September 8th 05 04:19 PM
connection to oracle with excel andy[_6_] Excel Programming 1 August 10th 04 03:53 PM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"