<?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 Write Back to database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173266#M42508</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have searched the site and cant seem to find very much information on writing back to databases. There are a few posts but the attachments are not there and I cant reply. Does any one know where I can find documentation on macros for writing to databases and maybe some examples of how this can be accomplished?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 01 Sep 2009 21:55:51 GMT</pubDate>
    <dc:creator />
    <dc:date>2009-09-01T21:55:51Z</dc:date>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173266#M42508</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have searched the site and cant seem to find very much information on writing back to databases. There are a few posts but the attachments are not there and I cant reply. Does any one know where I can find documentation on macros for writing to databases and maybe some examples of how this can be accomplished?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 21:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173266#M42508</guid>
      <dc:creator />
      <dc:date>2009-09-01T21:55:51Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173267#M42509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;here's an example of a vbscript writing to sql server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;dim sServer, sConn, oConn,oRS&lt;BR /&gt;sServer="sqlservername"&lt;BR /&gt;sConn="provider=sqloledb;data source=" &amp;amp; sServer &amp;amp; ";initial catalog=logoninfo"&lt;BR /&gt;Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt;oConn.Open sConn, "username", "secretpassword"&lt;BR /&gt;Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;sSQL="insert into logonoff(username,compname,ip,ontime) values('" &amp;amp; sUserName &amp;amp; "','" &amp;amp; sComputerName &amp;amp; "','" &amp;amp; sIP &amp;amp; "',getdate())"&lt;BR /&gt;ors.open sSQL, oconn&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Sep 2009 22:11:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173267#M42509</guid>
      <dc:creator />
      <dc:date>2009-09-01T22:11:37Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173268#M42510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is Logonoff the table name? Also, what I want the user to be able to do is enter text into an input box and write that information to the database via ajax. Any ideas on how to make that work. The user is evaluating Agents and wants to document the actions to take as well as comments. I want that to be written out to a SQL database. Will that work with the code listed here. How can I create the input boxes. At this point, I can only have an in input box for system created variables.&lt;/P&gt;&lt;P&gt;I want to pass four data elements to the data base.&lt;/P&gt;&lt;P&gt;Agent&lt;/P&gt;&lt;P&gt;Comments&lt;/P&gt;&lt;P&gt;Actions&lt;/P&gt;&lt;P&gt;Year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Sep 2009 03:34:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173268#M42510</guid>
      <dc:creator />
      <dc:date>2009-09-02T03:34:42Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173269#M42511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was getting an error that I couldnt connect. everything is connecting fine and it appears to be working only it is not writing to the database. Am I missing anything here?&lt;/P&gt;&lt;P&gt;sub writeback ()&lt;BR /&gt;dim sServer, sConn, oConn,oRS&lt;BR /&gt;sServer="XXXXXXXXX"&lt;BR /&gt;sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;BR /&gt;Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt;oConn.Open sConn, "XXXXXXXX", "XXXXXXX"&lt;BR /&gt;Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;sSQL="insert into TroyAgentReviews.dbo.AgentReviewNotes(AgentSub,Comments,Actions,Year) values('" &amp;amp; Subcode &amp;amp; "','" &amp;amp; Comments &amp;amp; "','" &amp;amp; Actions &amp;amp; "','2009')"&lt;BR /&gt;oRS.open sSQL, oConn&lt;BR /&gt;'Set oRS = oConn.Execute(sSQL)&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 03:49:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173269#M42511</guid>
      <dc:creator />
      <dc:date>2009-09-04T03:49:18Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173270#M42512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the line that does the actual writing is commented:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;'Set oRS = oConn.Execute(sSQL)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2009 04:36:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173270#M42512</guid>
      <dc:creator />
      <dc:date>2009-09-04T04:36:10Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173271#M42513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It writes with or without that particular line. I have been able to write to the database although, it only passes 2009 as the year. The other fields are blank. why isnt it passing the other data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 01:59:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173271#M42513</guid>
      <dc:creator />
      <dc:date>2009-09-10T01:59:02Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173272#M42514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your insert statement is hard-coded to always write 2009 in the year field&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sSQL="insert into TroyAgentReviews.dbo.AgentReviewNotes(AgentSub,Comments,Actions,Year) values('" &amp;amp; Subcode &amp;amp; "','" &amp;amp; Comments &amp;amp; "','" &amp;amp; Actions &amp;amp; "','&lt;STRONG&gt;2009'&lt;/STRONG&gt;)" &amp;lt;----&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 03:05:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173272#M42514</guid>
      <dc:creator />
      <dc:date>2009-09-10T03:05:23Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173273#M42515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is writing that as I have it hard-coded. It is not writing what is populated in the Subcode, Comments or Actions fields.&lt;/P&gt;&lt;P&gt;here is my sql table after I run the macro&lt;/P&gt;&lt;P&gt;Subcode Comments Actions Year&lt;/P&gt;&lt;P&gt;2009&lt;/P&gt;&lt;P&gt;I have one row of data in each of these fields and they are not being written to the database: Subcode, Comments, Actions. Do I need to use a set statement like&lt;/P&gt;&lt;P&gt;Set Subcode = ActiveDocument.Fields("Subcode").GetPossibleValues&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 03:40:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173273#M42515</guid>
      <dc:creator />
      <dc:date>2009-09-10T03:40:23Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173274#M42516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;thoneycutt wrote:&lt;BR /&gt;It is writing that as I have it hard-coded. It is not writing what is populated in the Subcode, Comments or Actions fields.&lt;BR /&gt;here is my sql table after I run the macro&lt;BR /&gt;Subcode Comments Actions Year&lt;BR /&gt; 2009&lt;BR /&gt;I have one row of data in each of these fields and they are not being written to the database: Subcode, Comments, Actions. Do I need to use a set statement like&lt;BR /&gt;Set Subcode = ActiveDocument.Fields("Subcode").GetPossibleValues&lt;BR /&gt;?&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;sorry, I misunderstood your question.&lt;/P&gt;&lt;P&gt;Yes, you are correct, you need to get the values from qV before you send them to SQL.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Sep 2009 05:25:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173274#M42516</guid>
      <dc:creator />
      <dc:date>2009-09-10T05:25:55Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173275#M42517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Help&lt;BR /&gt;&lt;BR /&gt;Just i'm also having the same issue.&lt;BR /&gt;&lt;BR /&gt;sub writeback ()&lt;BR /&gt;dim sServer, sConn, oConn,oRS&lt;BR /&gt;sServer="localhost"&lt;BR /&gt;sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;BR /&gt;Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt;oConn.Open sConn, "sa", ""&lt;BR /&gt;Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;&lt;BR /&gt; set table = ActiveDocument.GetSheetObject( "TB01" )&lt;BR /&gt; For i = 0 to table.GetRowCount-1&lt;BR /&gt; set ID = table.GetCell(RowIter,0)&lt;BR /&gt; set Barcode = table.GetCell(RowIter,1)&lt;BR /&gt; set Partnercode = table.GetCell(RowIter,2)&lt;BR /&gt; msgbox i&lt;BR /&gt; msgbox Barcode&lt;BR /&gt;' sqlstr="insert into bis.dbo.Tbarcode_lookup (ID,Barcode,Partnercode) values('" &amp;amp; ID &amp;amp; "','" &amp;amp; Barcode &amp;amp; "','" &amp;amp; Partnercode &amp;amp; "')"&lt;BR /&gt; sqlstr="insert into bis.dbo.Tbarcode_lookup (ID,Barcode,Partnercode) values('1','5012345678','123')"&lt;BR /&gt; oRS.open sqlstr, oConn&lt;BR /&gt; Set oRS = oConn.Execute(sqlstr)&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error message Type mismatch&lt;BR /&gt;Msgbox i does provide me the record number but my msgbox barcode fails.&lt;BR /&gt;&lt;BR /&gt;if i remove the message box for barcode, i can insert my one hardcoded value above. Any ideas would i'm doing wrong.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:20:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173275#M42517</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2009-09-23T22:20:21Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173276#M42518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;does msgbox cstr(barcode) work?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:27:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173276#M42518</guid>
      <dc:creator />
      <dc:date>2009-09-23T22:27:17Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173277#M42519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No i get Type mismatch: 'cstr'&lt;BR /&gt;&lt;BR /&gt;Ps i don't now the ABC of VB&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:32:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173277#M42519</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2009-09-23T22:32:47Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173278#M42520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I had to populate the fields before I could write them. this is What I ended up with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sub writeback ()&lt;BR /&gt; dim sServer, sConn, oConn,oRS&lt;BR /&gt; dim sSubcodeSelected, sActionSelected, sCommentSelected&lt;BR /&gt; dim sSubcode, sComments, sActions&lt;BR /&gt; dim sSubcodemsg, sCommentsmsg, sActionsmsg&lt;/P&gt;&lt;P&gt;sServer="xxxxxxxxxx"&lt;BR /&gt; sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;BR /&gt; Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt; oConn.Open sConn, "xxxxxxxxxx", "xxxxxxxx"&lt;BR /&gt; Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;&lt;BR /&gt; ' Get selected Value&lt;BR /&gt; set sSubcodeValues = ActiveDocument.Fields("Subcode").GetPossibleValues&lt;BR /&gt; Set sCommentsValues = ActiveDocument.Variables("Comments2")&lt;BR /&gt; Set sActionsValues = ActiveDocument.Variables("Actions2")&lt;/P&gt;&lt;P&gt;sSubcodemsg ="([Subcode]='"&amp;amp; sSubcodeValues.item(0).text &amp;amp; "')"&lt;BR /&gt; sSubcode = sSubcodeValues.item(0).text&lt;BR /&gt; sCommentsmsg = sCommentsValues.GetContent.String&lt;BR /&gt; sComments = sCommentsValues.GetContent.String&lt;BR /&gt; sActionsmsg = sActionsValues.GetContent.String&lt;BR /&gt; sActions = sActionsValues.GetContent.String&lt;/P&gt;&lt;P&gt;'msgbox sSubcodemsg&lt;BR /&gt; 'msgbox sCommentsmsg&lt;BR /&gt; 'msgbox sActionsmsg&lt;/P&gt;&lt;P&gt;sSQL="insert into TroyAgentReviews.dbo.AgentReviewNotes(AgentSub,Comments,Actions,Year) " _&lt;BR /&gt; &amp;amp; "values('" &amp;amp; sSubcode &amp;amp; "','" &amp;amp; sComments &amp;amp; "','" &amp;amp; sActions &amp;amp; "','2009')"&lt;BR /&gt; oRS.open(sSQL), oConn&lt;BR /&gt; oConn.close&lt;BR /&gt; Set oConn = nothing&lt;BR /&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:38:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173278#M42520</guid>
      <dc:creator />
      <dc:date>2009-09-23T22:38:27Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173279#M42521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attached adds comments or deletes comment to an excel file. This may or may not assist you.&lt;/P&gt;&lt;P&gt;Open the zip file and place the files in a folder named "C:\QlikViewExcel".&lt;/P&gt;&lt;P&gt;hth,&lt;/P&gt;&lt;P&gt;Stephen&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:43:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173279#M42521</guid>
      <dc:creator />
      <dc:date>2009-09-23T22:43:46Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173280#M42522</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;One step forward and i found another issue.&lt;BR /&gt;&lt;BR /&gt;sub writeback ()&lt;BR /&gt;dim sServer, sConn, oConn,oRS&lt;BR /&gt;sServer="localhost"&lt;BR /&gt;sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;BR /&gt;Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt;oConn.Open sConn, "sa", "q1w2zaxs"&lt;BR /&gt;Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;&lt;BR /&gt; set table = ActiveDocument.GetSheetObject("TB01")&lt;BR /&gt; For RowIter = 0 to table.GetRowCount-1&lt;BR /&gt; 'msgbox i &amp;amp; ": " &amp;amp; ID(i)&lt;BR /&gt; set ID = table.GetCell(RowIter,0)&lt;BR /&gt; 'ActiveDocument.Fields("Barcode").GetPossibleValues&lt;BR /&gt; set Barcode = table.GetCell(RowIter,1)&lt;BR /&gt; set Partnercode = table.GetCell(RowIter,2)&lt;BR /&gt; ' msgbox RowIter&lt;BR /&gt; ' msgbox Barcode.Text&lt;BR /&gt; ' out sqlstr&lt;BR /&gt; ' wscript.echo ID&lt;BR /&gt;' sqlstr="insert into bis.dbo.Tbarcode_lookup (ID,Barcode,Partnercode) values('" &amp;amp; ID(i) &amp;amp; "','" &amp;amp; Barcode &amp;amp; "','" &amp;amp; Partnercode &amp;amp; "')"&lt;BR /&gt; sqlstr="insert into bis.dbo.Tbarcode_lookup (ID,Barcode,Partnercode) values('" &amp;amp; RowIter &amp;amp; "','" &amp;amp; Barcode.Text &amp;amp; "','" &amp;amp; Partnercode.Text &amp;amp; "')"&lt;BR /&gt; oRS.open sqlstr, oConn&lt;BR /&gt; Set oRS = oConn.Execute(sqlstr)&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;end sub&lt;BR /&gt;&lt;BR /&gt;works now but it's writing 3 times the number of records.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:52:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173280#M42522</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2009-09-23T22:52:18Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173281#M42523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Guys&lt;BR /&gt;&lt;BR /&gt;A quick thanks to all&lt;BR /&gt;&lt;BR /&gt;The working script is below.&lt;BR /&gt;&lt;BR /&gt;sub writeback ()&lt;BR /&gt;dim sServer, sConn, oConn,oRS&lt;BR /&gt;sServer="localhost"&lt;BR /&gt;sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;BR /&gt;Set oConn = CreateObject("ADODB.Connection")&lt;BR /&gt;oConn.Open sConn, "sa", "q1w2zaxs"&lt;BR /&gt;Set oRS =CreateObject("ADODB.Recordset")&lt;BR /&gt;&lt;BR /&gt; set table = ActiveDocument.GetSheetObject("TB01")&lt;BR /&gt; For RowIter = 0 to table.GetRowCount-1&lt;BR /&gt; set ID = table.GetCell(RowIter,0)&lt;BR /&gt; set Barcode = table.GetCell(RowIter,1)&lt;BR /&gt; set Partnercode = table.GetCell(RowIter,2)&lt;BR /&gt; ' msgbox RowIter&lt;BR /&gt; ' msgbox Barcode.Text&lt;BR /&gt; sqlstr="insert into bis.dbo.Tbarcode_lookup (ID,Barcode,Partnercode) values('" &amp;amp; RowIter &amp;amp; "','" &amp;amp; Barcode.Text &amp;amp; "','" &amp;amp; Partnercode.Text &amp;amp; "')"&lt;BR /&gt; oRS.open sqlstr, oConn&lt;BR /&gt; 'Set oRS = oConn.Execute(sqlstr)&lt;BR /&gt; next&lt;BR /&gt;&lt;BR /&gt;end sub&lt;BR /&gt;&lt;BR /&gt;Note that my barcode and partnercode feilds are varchar and ID is a number.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Sep 2009 22:59:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173281#M42523</guid>
      <dc:creator>sukydhak</dc:creator>
      <dc:date>2009-09-23T22:59:54Z</dc:date>
    </item>
    <item>
      <title>Write Back to database</title>
      <link>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173282#M42524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have this script :&lt;/P&gt;&lt;P&gt;but I'm using SQL Server locally, using Windows authentication-with no username or password.&lt;/P&gt;&lt;P&gt;How should I alter my 'oConn.Open sConn, "sa", "khgkhgghg"', as mine should probably empty.&lt;/P&gt;&lt;P&gt;My script is : &lt;/P&gt;&lt;P&gt;sub writeback ()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dim sServer, sConn, oConn,oRS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sServer="localhost"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sConn="provider=sqloledb;data source=" &amp;amp; sServer&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set oConn = CreateObject("ADODB.Connection")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oConn.Open sConn, "sa", "khgkhgghg"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Set oRS =CreateObject("ADODB.Recordset")&lt;/P&gt;&lt;P&gt;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set table = ActiveDocument.GetSheetObject("TB04")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;For RowIter = 0 to table.GetRowCount-1&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set RowID = table.GetCell(RowIter,0)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set Name = table.GetCell(RowIter,1)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;set Grade = table.GetCell(RowIter,2)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'set Working = table.GetCell(RowIter,3)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'set [Date] = table.GetCell(RowIter,4)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'set Code = table.GetCell(RowIter,5)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' msgbox RowIter&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;' msgbox Barcode.Text&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;sqlstr="insert into Test.dbo.working (RowID,Name,Grade) values('" &amp;amp; RowID &amp;amp; "','" &amp;amp; Name.Text &amp;amp; "','" &amp;amp; Grade.Text &amp;amp; "')"&amp;nbsp; ',Working,Date,Code&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oRS.open sqlstr, oConn&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;'Set oRS = oConn.Execute(sqlstr)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Mar 2012 19:25:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Write-Back-to-database/m-p/173282#M42524</guid>
      <dc:creator />
      <dc:date>2012-03-12T19:25:34Z</dc:date>
    </item>
  </channel>
</rss>

