Micro Focus QTP (UFT) Forums
Connecting to database - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: Connecting to database (/Thread-Connecting-to-database)



Connecting to database - Irishman - 07-24-2012

I am using the following DBConnectStr:

Code:
"driver={Oracle in OraClient11g_home1};Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Database IP address)(PORT = Portname)))(CONNECT_DATA = (SERVICE_NAME = DB Name)));User Id=CCE;Password=CCE;DB=PRCSMISClocal"

I also tried

Code:
"Provider=MSDAORA;driver={Oracle in OraClient11g_home1};Data Source=(DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = Database IP address)(PORT = Portname)))(CONNECT_DATA = (SERVICE_NAME = DB Name)));User Id=CCE;Password=CCE;DB=PRCSMISClocal"

I am getting errors when I call
Code:
oADODBRecordset.Open sQuery, sDBConnectStr
either (Option 1) Data source name is too long or
(Option 2) stating Oracle client and networking compontents are not found. They are supplied by Oracle 7.3.3 or later.

In the Oracle ODBC Driver Configuration I have under data source
Name Driver
IP address of DB Oracle in OraClient11g_home1

and the test connection works

any ideas on how to fix this issue, I will need to look at results provided in sql tables to do some automation for my job.