cancel
Showing results for 
Search instead for 
Did you mean: 

Connect TestComplete to Oracle database using Progress Datadirect Driver

Highlighted
Community Leader

Connect TestComplete to Oracle database using Progress Datadirect Driver

Hi,

I did not find any instruction for this one so im sharing my solution with you guys.

 

To properly configure the Oracle Database Connection:

 

1) Install the driver available in (b)
2) Perform 'Data Source' configuration available in point c).
3) Learn how to handle ADO class in TestComplete

 

Example of a valid JS to connect TC to Oracle:
I)

var connectstring = "Data Source=Oracle Wire Protocol;User ID=user;Password=pass";

var query = ADO.CreateADOQuery();
query.ConnectionString = connectstring;
query.SQL = "select * from MRP_PERFORMANCE;";
query.Open();
query.First();

var res = query.FieldByName("Field").Value;

II)

var connectstring = "Data Source=Oracle Wire Protocol;User ID=user;Password=pass";

var query = ADO.CreateADOQuery();
query.ConnectionString = connectstring;
query.SQL =
`
SELECT mrp.firm_mrp(1) AAAAA FROM firm
`;
query.Open();
query.First();

var res = query.FieldByName("AAAA").Value;

Helpful links:

(a) Doc SmartBear:
https://community.smartbear.com/t5/TestComplete-Functional-Web/Oracle-connection/td-p/69246
In the article there is an entry (7) giving a valid example of a connection to the Oracle database using ADO class

 

(b) Oracle ODBC Driver
https://www.progress.com/odbc/oracle-database
Using this driver allows you to set the appropriate 'Data Source' in the connection string.

 

(c) Correct 'Data Source' configuration
https://documentation.progress.com/output/DataDirect/odbcquickstarts/oracleodbc_win_quickstart/index...
Search for 'ODBC Administrator' service in Windows10 -> follow the instructions.

 

 

Tags (1)
3 REPLIES 3
Community Hero

Re: Connect TestComplete to Oracle database

Hi,

 

Correct in case you are using Oracle ODBC driver.

If you have Oracle OLE DB provider you may use pure ADO and provide relevant connection string.

I did not go through the referenced links, but one must remember that the bitness of ODBC driver, DSN (and ODBC Administrator) and/or OLE DB provider *must* match the bitness of TestComplete.

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Community Leader

Re: Connect TestComplete to Oracle database

Hi

 

 
 
Community Manager

Re: Connect TestComplete to Oracle database

Thanks for sharing your investigation with us @Wamboo.

I'll add this topic to the TechCorner area.

 

 

---------
Tanya Gorbunova
SmartBear Community Manager

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others.↓↓↓↓↓
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors