0 Replies Latest reply: Aug 1, 2012 8:04 AM by 953293 RSS

    Excel VBA Macro to fetch datas from Oracle DB on Win 7/64-Bit Excel 2010

    953293
      Hi,


      we are using ERP System based on Oracle DB. I have an oracle client 10.2.0 installed on my machine (Win 7/64-Bit) and trying to create Excel(2010) VBA-Macro to
      get datas out of the Oracle DB using a SQL query:

      On my old machine (Win XP/Excel 2007) following worked fine:
      -----------------------------

      .....

      strConOracle = "Driver={Microsoft ODBC for Oracle}; " & _
      "CONNECTSTRING=(DESCRIPTION=" & _
      "(ADDRESS=(PROTOCOL=TCP)" & _
      "(HOST=" & strHost & ")(PORT=1521))" & _
      "(CONNECT_DATA=(SERVICE_NAME=" & strDatabase & "))); uid=" & strUser & " ;pwd=" & strPassword & ";"
      Set oConOracle = CreateObject("ADODB.Connection")
      Set oRsOracle = CreateObject("ADODB.Recordset")
      oConOracle.Open strConOracle

      Set oRsOracle = oConOracle.Execute(strSQL)

      ....
      -------------------------

      All the datas in the variables coming from cells or userforms - I am 100% sure all this is correct, as as said, it works on any Win XP Machine with Excel 2007


      But trying same with Win 7/64-Bit/Excel 2010 gives me following error:

      MS ODBC Driver for Oracle: ora-01019: unable to allocate memory in the user side


      Any ideas what to do to solve this - maybe different driver & code (please explain in details)


      Thanks and regards....