MaharajanM
Programmer
Hi All,
Oracle 7.3.4 server is installed in Sun Machine, oracle client and SQL PULS 3.3.4 are installed in my PC. After configuring tnsnames.ora file, i able to connect with
DB using sql plus.
Now i wanna connect with the same DB through VBA code.
do i need to install any drivers/libraries?
can i use below code segment?
Dim Cn As ADODB.Connection
Dim Conn As String
Conn = "DSN=<service name>;UID=user;PWD=pwd;"
Set Cn = New ADODB.Connection
Cn.ConnectionString = Conn
Cn.Open
If Cn.State = adStateOpen Then
MsgBox "Connected"
Else
MsgBox "Not able to connect"
End If
Thanks
Maharajan
Oracle 7.3.4 server is installed in Sun Machine, oracle client and SQL PULS 3.3.4 are installed in my PC. After configuring tnsnames.ora file, i able to connect with
DB using sql plus.
Now i wanna connect with the same DB through VBA code.
do i need to install any drivers/libraries?
can i use below code segment?
Dim Cn As ADODB.Connection
Dim Conn As String
Conn = "DSN=<service name>;UID=user;PWD=pwd;"
Set Cn = New ADODB.Connection
Cn.ConnectionString = Conn
Cn.Open
If Cn.State = adStateOpen Then
MsgBox "Connected"
Else
MsgBox "Not able to connect"
End If
Thanks
Maharajan