08-20-2014, 05:26 PM
Try to connect oracle server through UFT.Getting Ora6413 error
Code:
Function DBExecuteField(ByVal DB_NAME,ByVal DB_HOSTNAME,ByVal DB_PORTNUM,ByVal DB_USR,ByVal DB_PWD)
On error resume next
Set objConnection = CreateObject("ADODB.Connection")
Set objRCset=CreateObject("ADODB.RecordSet")
ConStr = "Driver={Microsoft ODBC for Oracle}; " & _
"CONNECTSTRING=(DESCRIPTION=" & _
"(ADDRESS=(PROTOCOL=TCP)" & _
"(HOST=" & DB_HOSTNAME & ")(PORT=" & DB_PORTNUM & "))" & _
"(CONNECT_DATA=(SID=" & DB_NAME & "))); uid=" & DB_USR & ";pwd=" & DB_PWD &";"
objConnection.Open ConStr
objConnection.CommandTimeout = 300
End Function