Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-12154: TNS could not resolve the connect identifier specified

956058Aug 16 2012 — edited Aug 17 2012
Hi,
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 14 2012
Added on Aug 16 2012
10 comments
3,646 views