views:

36

answers:

1

Hi

I am trying to connect to oracle server from excel...i dont want to install oracle client in my system(presently there is no oracle client) So i am using Microsoft ODBC for Oracle

 Dim strConnection, conn, rs, strSQL
 strConnection = "Driver={Microsoft ODBC for Oracle};Server=ServerName;Uid=username;Pwd=password;" 
Set conn = CreateObject("ADODB.Connection")
conn.Open strConnection
'insq = "insert into State (States) values ('" + Sheet1.Cells(1, 5) + "')"
'conn.Execute insq
conn.Close
Set conn = Nothing  

The Error is : Oracle Client and networking component not found

I have also tried using connection string

trConnection = "Provider=OraOLEDB.Oracle;Data Source=Datasource;User  Id=username;Password=password;"
'strConnection = "Provider=MSDAORA;Data Source==Datasource;User Id=username;Password=password;"

But still i am getting an error

My main question is can we connect from excel to oracle server without oracle client in my system..

A: 

Ultimately you need something on your system that 'speaks Oracle'. To begin with it needs to know how the protocol works to get the specified password accepted by Oracle, even before it gets into doing anything with data.

You are best off installing the Instant Client (Basic and ODBC supplement).

Gary