Gadzilla
15 years agoContributor
Enable to connect to Oracle DB from Virtual machine using ADO
Looks like my question is not related to TestComplete, but might someone can help me to solve the problem.
I have installed Oracle Database 10g Express Edition on my PC (full PC name is "MyPC.MyDomain.com").
After that I am trying to execute some SQL query (with help of TestComplete) to data base called "XE" with the following code snippet:
var connection = new ActiveXObject("ADODB.Connection") ;
var connectionstring = "Driver={Microsoft ODBC for Oracle};Server=MyPC.MyDomain.com:1521/XE;Uid=MyUid;Pwd=MyPwd;";
connection.Open(connectionstring);
...
This piece of code works fine on my local PC, but it won't work when I am trying to run the same code from virtual machine that is run on PC where Oracle database is installed. I get the following error:
"The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation."
I have also tried to change connectionstring to the following:
var connectionstring = "Provider=OraOLEDB.Oracle;dbq=MyPC.MyDomain.com:1521/XE;Database=XE;User Id=MyUid;Password=MyPwd;";
In this case I also can query data base on my local machine (e.g. on PC named "MyPC.MyDomain.com") without any problems. But I got the following error message at attempt to run the same script from virtual machine:
"Provider cannot be found. It may not be properly installed."
Could someone help me to solve the problem? Also can someone tell me whether it is possible to execute SQL query with help of JScript on some database that is running on some server somewhere in the internet (of course in case I have login credentials to this data base).
Thanks in advance.
I have installed Oracle Database 10g Express Edition on my PC (full PC name is "MyPC.MyDomain.com").
After that I am trying to execute some SQL query (with help of TestComplete) to data base called "XE" with the following code snippet:
var connection = new ActiveXObject("ADODB.Connection") ;
var connectionstring = "Driver={Microsoft ODBC for Oracle};Server=MyPC.MyDomain.com:1521/XE;Uid=MyUid;Pwd=MyPwd;";
connection.Open(connectionstring);
...
This piece of code works fine on my local PC, but it won't work when I am trying to run the same code from virtual machine that is run on PC where Oracle database is installed. I get the following error:
"The Oracle(tm) client and networking components were not found. These components are supplied by Oracle Corporation and are part of the Oracle Version 7.3 (or greater) client software installation."
I have also tried to change connectionstring to the following:
var connectionstring = "Provider=OraOLEDB.Oracle;dbq=MyPC.MyDomain.com:1521/XE;Database=XE;User Id=MyUid;Password=MyPwd;";
In this case I also can query data base on my local machine (e.g. on PC named "MyPC.MyDomain.com") without any problems. But I got the following error message at attempt to run the same script from virtual machine:
"Provider cannot be found. It may not be properly installed."
Could someone help me to solve the problem? Also can someone tell me whether it is possible to execute SQL query with help of JScript on some database that is running on some server somewhere in the internet (of course in case I have login credentials to this data base).
Thanks in advance.