Micro Focus QTP (UFT) Forums
Try to connect oracle server through UFT.Getting Ora6413 error - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Try to connect oracle server through UFT.Getting Ora6413 error (/Thread-Try-to-connect-oracle-server-through-UFT-Getting-Ora6413-error)



Try to connect oracle server through UFT.Getting Ora6413 error - siteshag - 08-20-2014

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