ORA-12154: TNS:could not resolve service name

I have a VB6 project.  When I run it from with in the VB6 development enviornmnet the database connections works.  However, when I compile the project, the same code gives the following set of errors when the EXE is ran.

Error No: 00001 An error occurred while connecting to the 'FMIMSDEVLSC' database.

ORA-12154: TNS:could not resolve service name
ljpitreAsked:
Who is Participating?
 
moduloConnect With a Mentor Commented:
PAQed with points refunded (500)

modulo
Community Support Moderator
0
 
SaxonWicaCommented:
Did you run the exe from another computer?
0
 
tomvergoteCommented:
Check your TNSnames.ora configuration file
0
 
ljpitreAuthor Commented:
I found the cause. The folder name of the project was "FMIMS_VB(EXE)"  The runtime (EXE) did not like the (EXE) in the folder name.  When I removed the () from the folder name, the runtime version worked ok.  I do not understand why the parenthesis as part of the folder name where the EXE was stored caused a TNS error.
0
 
quaylochjackCommented:
Hello.

Just a comment. I had a problem with ORA 12154 Unable to resolve TNSNames.... and I think the underlying cause was similar to this.....

Story: I was running an applet (developed in VB) to query against an Oracle db.... using Oracle 8 client.... everything fine...... then installed Oracle 9i client.... changed out ODBC (Test connection ok) ...... but the VB applet would no longer connect...got the ORA 12154...

So... used other (non VB) apps to test connections.... all okay.... just the VB applet would not connect....  

Now, to clarify, I must admit that the fact of it being "VB" or "Not VB" did not occur to me while I was investigating.... until I read this posting and the thing about EXE being in the folder name..... when I looked at my install folder it did not have EXE in the folder name, but what it did have was parenthesis () in the folder name...... did a quick experiment.... tried running applet and connecting to db first with the exe in a folder with parenthesis, then in a folder without parenthesis.... sure enough, the brackets in the folder name were the problem...

So.. problem solved for me but I do not know why.... ie is it an Oracle 9 thing? is it a VB thing? or combo of both?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.