Forum Discussion
nikhil_nimbhal
12 years agoOccasional Contributor
Hi Alexei,
Sorry for delayed response. Following are the information you requested:
a) TestComplete is 32-bit application (though it can drive 64-bit ones as well) and thus can use only 32-bit ODBC/OLEDB drivers which, in their turn can work only with 32-bit DSNs (if needed). So ensure that the driver that you are trying to use is 32-bit one
I am able to make the connection and execute queries , if DSN is configured. That is not an issue.
b) Can you post here the code that gives you problem?
The problem stems from the requirement of creating DSN-less connection through testcomplete. As I want to run my tests on various machine . I do not wish to manually configure DSN on each machine.
On trying different connection strings as posted above, I always get the error :
Data source name not found and no default driver is specified.
Please see the following code :
AConnection = Sys["OleObject"]("ADODB.Connection");
AConnection["ConnectionString"]=Driver=[Microsoft ODBC for Oracle]; CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST={hostname})(PORT={portname}))(CONNECT_DATA=(SERVICE_NAME={dbname}))); uid=userid;pwd=password;
AConnection["Open"]();
Now I have also used SID instead of Service name but I still get the same error.
Any help in the mattter will be appreciated.
Thanks,
Nikhil
Sorry for delayed response. Following are the information you requested:
a) TestComplete is 32-bit application (though it can drive 64-bit ones as well) and thus can use only 32-bit ODBC/OLEDB drivers which, in their turn can work only with 32-bit DSNs (if needed). So ensure that the driver that you are trying to use is 32-bit one
I am able to make the connection and execute queries , if DSN is configured. That is not an issue.
b) Can you post here the code that gives you problem?
The problem stems from the requirement of creating DSN-less connection through testcomplete. As I want to run my tests on various machine . I do not wish to manually configure DSN on each machine.
On trying different connection strings as posted above, I always get the error :
Data source name not found and no default driver is specified.
Please see the following code :
AConnection = Sys["OleObject"]("ADODB.Connection");
AConnection["ConnectionString"]=Driver=[Microsoft ODBC for Oracle]; CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP) (HOST={hostname})(PORT={portname}))(CONNECT_DATA=(SERVICE_NAME={dbname}))); uid=userid;pwd=password;
AConnection["Open"]();
Now I have also used SID instead of Service name but I still get the same error.
Any help in the mattter will be appreciated.
Thanks,
Nikhil