Micro Focus QTP (UFT) Forums
ORA-06413: Connection not open - 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: ORA-06413: Connection not open (/Thread-ORA-06413-Connection-not-open)



ORA-06413: Connection not open - soumen - 12-11-2013

I am using the following function in QTP 11 to fetch data from Oracle in Windows XP 32-bit machine:

Code:
strConn = "DRIVER={Microsoft ODBC for Oracle};UID=******;PWD=******;SERVER=******;"
strQuery = "select * from ref_enterprise"

Public Function ADODB_DBConnection(strConn, strQuery)
   Dim conn, rs
   Set conn = CreateObject("ADODB.Connection")
   With conn
    .ConnectionString = strConn
    .Open
        Set rs = CreateObject("ADODB.Recordset")
        rs.Open strQuery, conn, 3, 3
   End With
   ADODB_DBConnection = Array(rs.RecordCount, rs, rs.Fields.Count, conn)
   Set conn = Nothing
   Set rs = Nothing
End Function

Data = ADODB_DBConnection(strConn, strQuery)

msgbox Data(0)
msgbox Data(1).Fields(0).Value

The above code gets executed without any error.

However, I am getting the following error on executing the same script in Windows7 64-bit machine while fetching data from Oracle:
ORA-06413: Connection not open

Can somebody help with the exact steps that would be required. I have tried several options after searching the internet, but none worked so far.


RE: ORA-06413: Connection not open - soumen - 12-13-2013

Can anyone reply? I am stuck on this.