Micro Focus QTP (UFT) Forums
Not able to connect to Oracle SQL Developer - 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 Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: Not able to connect to Oracle SQL Developer (/Thread-Not-able-to-connect-to-Oracle-SQL-Developer)



Not able to connect to Oracle SQL Developer - Paras Singh - 05-30-2013

Hi,

Not able to connect to Oracle SQL Developer, pls help asap.
Oracle SQL Developer Version : 3.0.02

I am using the below codes:
1) Using Microsoft ODBC for Oracle

Code:
Dim StrDBDesc,strUserID,strPassword,ADOBDConnection

StrDBDesc = "(description=(address=(host=hostname)(protocol=protocol name)(port=portnumber))(connect_data=(service_name=service name)))"
strUserID = "username"
strPassword = "password"

Set ADOBDConnection = Createobject("ADODB.Connection")
strConnection = "Driver={Microsoft ODBC for Oracle};CONNECTSTRING=" &StrDBDesc&";Uid=" &strUserID& ";Pwd=" &strPassword&";"
ADOBDConnection.Open strConnection

2) Using Provider=OraOLEDB.Oracle
Code:
Dim StrDBDesc,strUserID,strPassword,ADOBDConnection

StrDBDesc = "(description=(address=(host=hostname)(protocol=protocol name)(port=portnumber))(connect_data=(service_name=service name)))"
strUserID = "username"
strPassword = "password"

Set ADOBDConnection = Createobject("ADODB.Connection")
strConnection = "Provider=OraOLEDB.Oracle;Data Source="&StrDBDesc&";UserID="&strUserID&";Password="&strPassword&";"ADOBDConnection.Open strConnection


By using above two ways of codes, I am getting the errors, attached the doc.


PLease Help on this..
Thanks,