I'm trying to link into an Oracle database through MS Access linked tables so I can run some reports. I have setup the Oracle database in the tnsnames.ora file, and can access the database using SQL Plus. So my permissions and everything are there. BUT, when I try to link in using a new DNS or a direct ODBC call I get a run time error:
COULD NOT RESOLVE SERVICE NAME
Any suggestions? I am entering the same user ID and password I use to logon to SQL Plus.
Thanks,
Thomas
************TEST VBA CODE**********************
Private Sub Command0_Click()
Dim cnoracle As Connection
Dim rsoracle As Recordset
Set cnoracle = New Connection
With cnoracle
.Provider = "MSORAOLE"
.ConnectionString = "Driver={Microsoft ODBC for ORACLE};
ODBC; UID= UID; PWD= PWD; Server=gbv03p"
.Open <---------- hangs on this command
End With
Set rsoracle = New Recordset
rsoracle.Open "SELECT full_name FROM gv_user", cnoracle
MsgBox rsoracle!full_name
End Sub
************TNSNAMES.ORA ENTRY***************
gbv03p = (DESCRIPTION =
(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = sjcds007)(PORT =1521)))
(CONNECT_DATA = (SID = gbv03p)(GLOBAL_NAME= gbv03p.world)))
COULD NOT RESOLVE SERVICE NAME
Any suggestions? I am entering the same user ID and password I use to logon to SQL Plus.
Thanks,
Thomas
************TEST VBA CODE**********************
Private Sub Command0_Click()
Dim cnoracle As Connection
Dim rsoracle As Recordset
Set cnoracle = New Connection
With cnoracle
.Provider = "MSORAOLE"
.ConnectionString = "Driver={Microsoft ODBC for ORACLE};
ODBC; UID= UID; PWD= PWD; Server=gbv03p"
.Open <---------- hangs on this command
End With
Set rsoracle = New Recordset
rsoracle.Open "SELECT full_name FROM gv_user", cnoracle
MsgBox rsoracle!full_name
End Sub
************TNSNAMES.ORA ENTRY***************
gbv03p = (DESCRIPTION =
(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = sjcds007)(PORT =1521)))
(CONNECT_DATA = (SID = gbv03p)(GLOBAL_NAME= gbv03p.world)))