hb
6 years agoOccasional 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
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;
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 & ";"
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)
'--- Open the above connection string.
Con.Open (connectionString)
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