<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Combine macro for writing data to database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Combine-macro-for-writing-data-to-database/m-p/374888#M705366</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro which let you add one value to your database:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/135858#135858"&gt;http://community.qlik.com/message/135858#135858&lt;/A&gt;&lt;SPAN&gt; | &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/135858#135858"&gt;http://community.qlik.com/message/135858#135858&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro to add values within a QVW-file. For this macro i also encluded an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-size: 10pt;"&gt;sub InsertRecord&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;set v = ActiveDocument.GetVariable("vInsertRecord")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;v.SetContent "1", true&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;ActiveDocument.PartialReload&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;v.SetContent "0", true&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;end sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gr. Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Mar 2012 07:20:10 GMT</pubDate>
    <dc:creator>shahamel</dc:creator>
    <dc:date>2012-03-29T07:20:10Z</dc:date>
    <item>
      <title>Combine macro for writing data to database</title>
      <link>https://community.qlik.com/t5/QlikView/Combine-macro-for-writing-data-to-database/m-p/374888#M705366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dear users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;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.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro which let you add one value to your database:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;[[&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/135858#135858"&gt;http://community.qlik.com/message/135858#135858&lt;/A&gt;&lt;SPAN&gt; | &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://community.qlik.com/message/135858#135858"&gt;http://community.qlik.com/message/135858#135858&lt;/A&gt;&lt;SPAN&gt;]&lt;/SPAN&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the macro to add values within a QVW-file. For this macro i also encluded an example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT size="2"&gt;&lt;SPAN style="font-size: 10pt;"&gt;sub InsertRecord&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;set v = ActiveDocument.GetVariable("vInsertRecord")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;v.SetContent "1", true&lt;/SPAN&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;ActiveDocument.PartialReload&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;v.SetContent "0", true&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;end sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gr. Sandeep&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Mar 2012 07:20:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Combine-macro-for-writing-data-to-database/m-p/374888#M705366</guid>
      <dc:creator>shahamel</dc:creator>
      <dc:date>2012-03-29T07:20:10Z</dc:date>
    </item>
  </channel>
</rss>

