<?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 Insert / Update data into MSSQL in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147966#M26334</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Werner,&lt;/P&gt;&lt;P&gt;here are an example of macro code for writing back into a databse.&lt;/P&gt;&lt;P&gt;&lt;B&gt;What you have to know is that I´m not able to comment this (i´m not a vba guy).&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub save&lt;BR /&gt;&lt;BR /&gt; Dim mConnection&lt;BR /&gt; Dim sqlstr&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Set mConnection = CreateObject("ADODB.Connection")&lt;BR /&gt; mConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Database\DBNeu.mdb"&lt;BR /&gt;&lt;BR /&gt; rem check all rows&lt;BR /&gt; set table = ActiveDocument.GetSheetObject( "TB01" )&lt;BR /&gt; for RowIter = 1 to table.GetRowCount-1&lt;BR /&gt; set ID = table.GetCell(RowIter,0)&lt;BR /&gt; set OStatus = table.GetCell(RowIter,1)&lt;BR /&gt; set NStatus = table.GetCell(RowIter,2)&lt;BR /&gt;&lt;BR /&gt; rem check for changes and write back into database&lt;BR /&gt; if OStatus.text &amp;lt;&amp;gt; NStatus.text then&lt;BR /&gt; sqlstr = "update fonds set Status=" &amp;amp; NStatus.Text &amp;amp; " where ID=" &amp;amp; ID.Text&lt;BR /&gt; mConnection.Execute sqlstr&lt;BR /&gt; table.SetInputFieldCell RowIter-1,1,NStatus.text&lt;BR /&gt; end if&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt; rem close database connection&lt;BR /&gt; Set mConnection = Nothing&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 01 Jul 2009 15:28:31 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-07-01T15:28:31Z</dc:date>
    <item>
      <title>Insert / Update data into MSSQL</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147964#M26332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know how to insert / update data directly from QV into MSSQL. Let's say I have done a what-if on my budgets and wanted to save that back into my DB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Werner&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Jun 2009 21:07:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147964#M26332</guid>
      <dc:creator />
      <dc:date>2009-06-29T21:07:45Z</dc:date>
    </item>
    <item>
      <title>Insert / Update data into MSSQL</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147965#M26333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've seen some examples on the forum using ADO in macro code. Search the forum.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 05:00:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147965#M26333</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2009-07-01T05:00:00Z</dc:date>
    </item>
    <item>
      <title>Insert / Update data into MSSQL</title>
      <link>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147966#M26334</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Werner,&lt;/P&gt;&lt;P&gt;here are an example of macro code for writing back into a databse.&lt;/P&gt;&lt;P&gt;&lt;B&gt;What you have to know is that I´m not able to comment this (i´m not a vba guy).&lt;/B&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub save&lt;BR /&gt;&lt;BR /&gt; Dim mConnection&lt;BR /&gt; Dim sqlstr&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; Set mConnection = CreateObject("ADODB.Connection")&lt;BR /&gt; mConnection.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:\Database\DBNeu.mdb"&lt;BR /&gt;&lt;BR /&gt; rem check all rows&lt;BR /&gt; set table = ActiveDocument.GetSheetObject( "TB01" )&lt;BR /&gt; for RowIter = 1 to table.GetRowCount-1&lt;BR /&gt; set ID = table.GetCell(RowIter,0)&lt;BR /&gt; set OStatus = table.GetCell(RowIter,1)&lt;BR /&gt; set NStatus = table.GetCell(RowIter,2)&lt;BR /&gt;&lt;BR /&gt; rem check for changes and write back into database&lt;BR /&gt; if OStatus.text &amp;lt;&amp;gt; NStatus.text then&lt;BR /&gt; sqlstr = "update fonds set Status=" &amp;amp; NStatus.Text &amp;amp; " where ID=" &amp;amp; ID.Text&lt;BR /&gt; mConnection.Execute sqlstr&lt;BR /&gt; table.SetInputFieldCell RowIter-1,1,NStatus.text&lt;BR /&gt; end if&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt; rem close database connection&lt;BR /&gt; Set mConnection = Nothing&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck!&lt;/P&gt;&lt;P&gt;Rainer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 01 Jul 2009 15:28:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Insert-Update-data-into-MSSQL/m-p/147966#M26334</guid>
      <dc:creator />
      <dc:date>2009-07-01T15:28:31Z</dc:date>
    </item>
  </channel>
</rss>

