Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Oracle database connection in Macro not working in IE and ok in QV Desktop

Hello,

We are facing a weird issue with our QV App. We need to insert one new record onto an Oracle Table and the Macro is working fine when we test with the QV Desktop. The issue raises when we do the same test with IE Plugin (Server 11R2 - QV Webserver). It doesn't work.

Do you have any clue??

Here you are the macro procedure (as you can see we have performed many many tests):

sub Registrar_Pedido(vEnviadoPor, vFecha, vDuracion, vNumEmpresas, vCampanya, vRelacionEmp, vEmailCliente, vRutaFicheroPendiente, _

                     vRutaFicheroProcesado, vRutaFicheroPedido, vObservaciones, vFiltrosQV)

 

  dim sConn, oConn

  Set oConn = CreateObject("ADODB.Connection")

    sConn = "dsn=d:/Pedidos/ODI_STG.dsn;uid=ODI_STG;password=ODI_STG;"

    'sConn = "Provider=OraOLEDB.oracle;User ID=ODI_STG;Password=ODI_STG;Data Source=SCH11G3;Persist Security Info=False;"

    'sConn = "Provider=OraOLEDB.Oracle;Data Source=192.168.70.96:1521:SCH11G3;User ID=ODI_STG;Password=ODI_STG;"

    'sConn = "Provider=OraOLEDB.Oracle;User ID=ODI_STG;Password=ODI_STG;Data Source=(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.70.96)(PORT = 1521)))CONNECT_DATA =(SERVICE_NAME = sch11g3)(SRVR = DEDICATED) )  );OLEDB.NET=true;SPPrmsLOB=true;Persist Security Info=False;"

    on error resume next

    oConn.Open "ODI_STG","ODI_STG","ODI_STG"

    'oConn.Open sConn

    vErr = err

    if vErr <> 0 then ' error inicializando conexión

       on error goto 0

       msgbox("Error - Consulte con el Administrador - No se puede establacer comunicación con la base de datos: [" & vErr & " - " & Oconn.State & "] " )

    else

       on error goto 0

    end if

  sSQL="insert into QV_LOG_PEDIDOS (PROYECTO,ENVIADO_POR, F_PEDIDO,DURACION,NUM_EMPRESAS,CAMPANYA,RELACION_EMP,EMAIL_CLIENTE," &_

           "RUTA_FICHERO_PENDIENTE,RUTA_FICHERO_PROCESADO, RUTA_FICHERO_PEDIDO, OBSERVACIONES, FILTROS_QV) " &_

        "       values ('PRODUCTOCOMERCIAL','" & vEnviadoPor & "','" & vFecha & "'," & vDuracion & "," & vNumEmpresas & ",'" & vCampanya & _

                     "','" & vRelacionEmp& "','" & vEmailCliente & _

                     "','" & vRutaFicheroPendiente & "','" & vRutaFicheroProcesado & "','" & vRutaFicheroPedido & "','" & vObservaciones & _

                     "','" & vFiltrosQV & "')"

    'Application.InputBoxEx "DEBUG:", sSQL

    oConn.Execute(sSQL)

  oConn.Close

  Set oConn = Nothing

end sub

Kind regards and thanks in advance

Javier

1 Reply
hugmarcel
Specialist
Specialist

Hi have you ever managed to solve the issue? I am having the same Problem (works on Desktop but not in Plugin)

Thx - Marcel