0 Replies Latest reply: Mar 29, 2012 3:24 AM by Sandeep Hamelink RSS

    Combine macro for writing data to database

    Sandeep Hamelink

      Dear users,

       

      I think it is possible to write a complete record from QVW to DB. I have found two macro's on this forum. I believe it is possible to combine those to macro's. When combined perfectly you should be able to write (in my case) leerlingID, Voornaam, Tussenvoegsel, Achternaam, Geboortedatum, Postcode, Woonplaats, Groep and "Datum_inschrijving" with a push on a button (that activates the combined macro) a new record to your database.

       

      Here is the macro which let you add one value to your database:

       

       

      [[http://community.qlik.com/message/135858#135858 | http://community.qlik.com/message/135858#135858]

       

       

      Here is the macro to add values within a QVW-file. For this macro i also encluded an example.

       

       

      sub InsertRecord



      set v = ActiveDocument.GetVariable("vInsertRecord")


      v.SetContent "1", true


      ActiveDocument.PartialReload


      v.SetContent "0", true




      end sub






       

      Gr. Sandeep