Forum Discussion

hb's avatar
hb
Occasional Contributor
6 years ago

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)
  • 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

  • tristaanogre's avatar
    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.

    • hb's avatar
      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's avatar
        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