ORA-12154: TNS could not resolve the connect identifier specified
956058Aug 16 2012 — edited Aug 17 2012Hi,
I am using Windows7 and Oracle 11.2.0 version. I am trying to access oracle database by using an excel(Office 2010) macros but it is showing the following error.
Run-time error '--2147467259 (80004005)':
ORA-12454: TNS:Could not resolve the connect identifier specified
On debugging it takes to following line:-
Private Function GET_DATA(PERIOD, YEAR) As String
Dim paymenttype As String
Set cn = New ADODB.Connection
With cn
.Provider = "MSDAORA"
.Properties("Data Source").Value = "T171i0"
'"d171i0"
'"PROD"
.Properties("User ID").Value = Logon_form.Urname.Value
.Properties("Password").Value = Logon_form.Pswd.Value
--> *.Open*
On Error Resume Next
End With
Could anybody help me to solve this issue.
Some point needs to be mentioned
1. I have checked TNSNAMES.ORA and it is fine.
2. I have also checked the security permision to oracle_home folder.
3. The same macro file is working fine when I ran it in windows server 2003 and Oracle 10.
4.System DSN is properly created.
I think there is a Version Incompatibility issue.
Thanks
Anupam