Micro Focus QTP (UFT) Forums
[UFT] Connection String for Oracle - 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: [UFT] Connection String for Oracle (/Thread-UFT-Connection-String-for-Oracle)



[UFT] Connection String for Oracle - robertosalemi - 12-28-2015

Hi,
i'm using SQL Developer for to connect to the database.
I have this parameters:
- username
- password
- hostname
- port
- SID

In VBScript, which is the connection string correct?

I tried more different connection strings, but nothing works.

Thanks.


RE: [UFT] Connection String for Oracle - vinod123 - 12-30-2015

Code:
"Driver={Microsoft ODBC for Oracle};Server=QTPWorld; Uid=your_username;Pwd=your_password;"



RE: [UFT] Connection String for Oracle - robertosalemi - 12-30-2015

Hi,
not works:
"Microsoft OLE DB Provider: for ODBC Drivers: [Microsoft Driver Manager] Data source name not found and no default driver specified".

Why?


RE: [UFT] Connection String for Oracle - vinod123 - 12-31-2015

Code:
con.ConnectionString =
     "User Id=scott;Password=tiger;Data Source=oracle;" +
     "Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;" +
     "Incr Pool Size=5; Decr Pool Size=2";



RE: [UFT] Connection String for Oracle - robertosalemi - 12-31-2015

Without ServiName or Host?

I try it, but I have the same problem.


RE: [UFT] Connection String for Oracle - vinod123 - 01-02-2016

Code:
Set con=createobject("oledb.connection") con.open "Driver={Microsoft ODBC for Oracle};Server=; Uid=your_username;Pwd=your_password;"


OR
Check ODBC driver is available.
If not able to do DSN then Go to environmental variable and then set path

Code:
ConnectionString = "Provider=OraOLEDB.Oracle;Data Source="&mysource&";User Id="&user&";Password="&password&";"



RE: [UFT] Connection String for Oracle - robertosalemi - 01-15-2016

Hi,
I have resolved.

I have modified my ConnectionString as:

Code:
DB_CONNECT_STRING = "Provider=OraOLEDB.Oracle; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=" & myHostName & ")(PORT=" & myPort & "))(CONNECT_DATA=(SERVER=dedicated)(" & serviceNameString & "))); User ID=" & myUsername & ";Password=" & myPassword & ";"

where I have added
SERVER=dedicated

If i launch my script through MS DOS it works, but If I use it in UFT I have this error:
"Provider cannot be found, it may not be properly installed"

Why?

I have added the plugin ORACLE in my project into UFT, maybe it is necessary another plugin?

Thanks.