Ask a Question

JScript runtime error. ORA-12541: TNS:no listener

SOLVED
hb
Occasional Contributor

JScript runtime error. ORA-12541: TNS:no listener

I have installed the new oracle 12 client on the machine (32 bit) , i have Excel-connecting to the oracle db as well, on the same machine, testcomplete keeps giving "JScript runtime error. ORA-12541: TNS:no listener Error location: Unit: "PWTestEngine\PWTestEngineJS\Script\TestActionsHelper" Line: 1185 Column: 3.

JScript runtime error.

ORA-12541: TNS:no listener
" error
 
From the same machine i have tried the excel macro and also visual studio both are using the same oraoledb driver and ADODB
from test complete
var recset = Sys.OleObject("ADODB.recordset");
var conObj = Sys.OleObject("ADODB.Connection");

var str1 = "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=";
var str2 = dbname + ")(PORT=" + dbport + ")))(CONNECT_DATA=(SERVICE_NAME= " + dbsid + ")(SERVER=DEDICATED)));";
var str3 = "User Id= " + dbuser + ";Password=" + dbpwd + ";";

var conString = str1 + str2+ str3;

conObj.Open(conString);
return conObj;
 
 
below is the one from macro
 
str1 = "Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST="
str2 = dbName & ")(PORT=" & dbPort & ")))(CONNECT_DATA=(SERVICE_NAME= " & dbSid & ")(SERVER=DEDICATED)));"
str3 = "User Id= " & dbUser & ";Password=" & dbPwd & ";"
connectionString = str1 + str2 + str3
'--- Open the above connection string.
Con.Open (connectionString)
3 REPLIES 3
tristaanogre
Esteemed Contributor

Under Help | About, what bitness of TestComplete are you running, x86 or 64 bit?  Because if you're running 64-bit, since you're using the 32-bit driver, TestComplete won't "see" that driver.  If you run TestComplete.exe from C:\Program Files (x86)\SmartBear\TestComplete 12\bin\, you'll be running the 32-bit version.  Run that and see if your problem continues.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
hb
Occasional Contributor

Hi Thank you for the response, my bad i did not include the test complete version before itself, i am using the 32 bit i have my shortcut referring to the below location

 

""C:\Program Files (x86)\SmartBear\TestComplete 12\Bin\TestComplete.exe""

hb
Occasional Contributor

added the env variable ORACLE_HOME , i had windows 10 installed on it and forgot about this PATH variable, this was working before the upgrade to windows 10. It started working once the path is added.

 

thanks again

cancel
Showing results for 
Search instead for 
Did you mean: