2 Replies Latest reply: Jul 7, 2013 7:06 PM by Kothandaram Mugalipoo RSS

    ActiveDocument.DynamicUpdateCommand doesn't work

    Cees Laming

      Hi all,

       

      I use the following to load some data:

       

      LOAD * INLINE [

          Alpha, Beta

          a, 0

          b, 0

          c, 0

          d, 0

          e, 0

          f, 0

          g, 0

      ];

       

      I have the following macro's (taken from the QlikView Automation Reference and updated to match the fields):

       

      sub Update

           SET Result = ActiveDocument.DynamicUpdateCommand("UPDATE * SET Beta = 1")

           if Result = false then

                MsgBox Result.ErrorMessage

           end if

      end sub

       

      sub Insert

           SET Result = ActiveDocument.DynamicUpdateCommand ("INSERT INTO * (Alpha, Beta) VALUES (x, 0), (y, 0), (z, 0)")

           if Result = false then

                MsgBox Result.ErrorMessage

           end if

      end sub

       

      I have a two buttons from which i trigger the Update and Insert macro.

       

      For some reason the values doesn't get updated or inserted. When i trigger one of these macro's the Edit Module opens and the line starting with SET Result .... is highlighted.

       

      Any sugestions on how to resolve this issue?