Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default What Is The Right Provider?

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;Data
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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default What Is The Right Provider?

Jim,

Are you able to ping the Oracle DB from the command prompt?

Type: "tnsping EDSSP.WORLD"

in a command window. If not successful then maybe you have a problem with
your tnsnames.ora

Tim

"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=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;Data
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




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default What Is The Right Provider?

Thanks for your response. I am perfectly able to connect to the table when I
use the macro recorder, so I am finding it difficult to thing it has anything
to do with TNSNames. But I entered the command you suggested and I got the
following:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL =
TCP)
(HOST = XXX.XX.XX.XX)(PORT = YYYY))) (CONNECT_DATA = (SERVICE_NAME = EBWP)))
OK (430 msec)

This seems to suggest that it worked just fine... doesn't?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default What Is The Right Provider?

I can send you a sample of what works for me when I get to work tomorrow...

Tim



"Jim Heavey" wrote in message
...
Thanks for your response. I am perfectly able to connect to the table
when I
use the macro recorder, so I am finding it difficult to thing it has
anything
to do with TNSNames. But I entered the command you suggested and I got
the
following:

Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL
=
TCP)
(HOST = XXX.XX.XX.XX)(PORT = YYYY))) (CONNECT_DATA = (SERVICE_NAME =
EBWP)))
OK (430 msec)

This seems to suggest that it worked just fine... doesn't?




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default What Is The Right Provider?

Thanks, I would appreciate that!


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,588
Default What Is The Right Provider?

Jim,

Either of these work for me:

sConnString = "Provider=MSDAORA;Password=" & Password & _
";User Id=" & User & _
";Data Source=" & Instance


sConnString = "Provider=OraOLEDB.Oracle;User Id =" & User & _
";Password=" & Password & _
";Data Source=" & Instance


Tim.

--
Tim Williams
Palo Alto, CA


"Jim Heavey" wrote in message
...
Thanks, I would appreciate that!



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
how can i get in contact with a template provider?? Jan Excel Discussion (Misc queries) 1 April 30th 09 05:52 PM
check for OLE DB provider? cesw[_6_] Excel Programming 3 December 1st 05 11:08 PM
Provider Issue with Version Change? cesw[_7_] Excel Programming 0 December 1st 05 08:34 PM
OLE DB Provider Valmir Meneses Excel Programming 0 January 29th 04 05:06 PM
Excel schema using Jet OLEDB Provider? mike Excel Programming 1 December 22nd 03 09:25 AM


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

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

About Us

"It's about Microsoft Excel"