Replies
Hi,
I resolved!
1) I checked the version of the Oracle database interested.
2) I installed this version of driver.
The DB connection in UFT works fine!
Thanks to all for the good support.
Hi,
I have resolved.
I have modified my ConnectionString as:
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 proprerly installed"
Why?
I have added the plugin ORACLE in my project into UFT, maybe it is necessary another plugin?
Thanks.
Hi Michael,
I tried this two connection string:
1)
DB_CONNECT_STRING = "Provider=OraOLEDB.Oracle; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=" & myHostName & ")(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=" & myServiceNameOrSID & "))); User ID=" & myUsername & ";Password=" & myPassword & ";"
with this error
"OraOLEDB: ORA-12514: TSN: Listener dows not currently know of service requeste in connect descriptor".
2) "Driver={Microsoft ODBC for Oracle};Server=myServerName; Uid=your_username;Pwd=your_password;"
whit this error
"Microsoft OLE DB Provider: for ODBC Drivers: [Microsoft Driver Manager] Data source name not found and no default driver specified".
This is my full code:
Function ConnectionTest()
DB_CONNECT_STRING = "Provider=OraOLEDB.Oracle; Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=" & myHostName & ")(PORT=1521))(CONNECT_DATA=(SERVICE_NAME=" & myServiceNameOrSID & "))); User ID=" & myUsername & ";Password=" & myPassword & ";"
Set myConn = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")
myConn.Open DB_CONNECT_STRING
objRecordSet.Open myQuery, myConn
Wscript.Echo objRecordSet.fields.item(1) & " " & objRecordSet.fields.item(2)
myConn.Close
End function
Call ConnectionTest()
Thanks a lot!