<?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  SQL server database when using odbc,but not working??? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/write-back-SQL-server-database-when-using-odbc-but-not-working/m-p/658344#M240248</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I write back &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; SQL server database when &lt;/SPAN&gt;using odbc,but not working.why?please help me!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Is there something that I am missing on configuration/settings?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Here is my macro below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sub writerecords&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dim conn,sqlstr&lt;/P&gt;&lt;P&gt;&amp;nbsp; set conn=CreateObject("ADODB.Connection")&amp;nbsp; '创建连接对象&lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.ConnectionString ="DSN=sql1"&amp;nbsp; '&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.open&amp;nbsp;&amp;nbsp; 'not working???????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set table=ActiveDocument.GetSheetObject("TB01")&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect=ActiveDocument.GetApplication().GetEmptyRect()&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Top=0&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Left=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Width=table.GetColumnCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Height=table.GetRowCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; set CellMatrix=table.GetCells(CellRect)&lt;/P&gt;&lt;P&gt;&amp;nbsp; for RowIter=CellRect.Top+1 to CellRect.Height-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; zhibao=CellMatrix(RowIter)(0).Text &lt;/P&gt;&lt;P&gt;&amp;nbsp; xiaxiang=CellMatrix(RowIter)(1).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; shangxiang=CellMatrix(RowIter)(2).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; sqlstr="insert into tab1(ID,Name,Age) values('"&amp;amp;zhibao&amp;amp;"','"&amp;amp;xiaxiang&amp;amp;"','"&amp;amp;shangxiang&amp;amp;"')" &lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.execute sqlstr&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.close&lt;/P&gt;&lt;P&gt;&amp;nbsp; set conn=nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp; msgbox "写入成功！" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 12 Aug 2014 07:46:19 GMT</pubDate>
    <dc:creator />
    <dc:date>2014-08-12T07:46:19Z</dc:date>
    <item>
      <title>write back  SQL server database when using odbc,but not working???</title>
      <link>https://community.qlik.com/t5/QlikView/write-back-SQL-server-database-when-using-odbc-but-not-working/m-p/658344#M240248</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;I write back &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt; SQL server database when &lt;/SPAN&gt;using odbc,but not working.why?please help me!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Is there something that I am missing on configuration/settings?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Here is my macro below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;sub writerecords&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; dim conn,sqlstr&lt;/P&gt;&lt;P&gt;&amp;nbsp; set conn=CreateObject("ADODB.Connection")&amp;nbsp; '创建连接对象&lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.ConnectionString ="DSN=sql1"&amp;nbsp; '&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.open&amp;nbsp;&amp;nbsp; 'not working???????&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; set table=ActiveDocument.GetSheetObject("TB01")&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect=ActiveDocument.GetApplication().GetEmptyRect()&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Top=0&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Left=0&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Width=table.GetColumnCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; CellRect.Height=table.GetRowCount&lt;/P&gt;&lt;P&gt;&amp;nbsp; set CellMatrix=table.GetCells(CellRect)&lt;/P&gt;&lt;P&gt;&amp;nbsp; for RowIter=CellRect.Top+1 to CellRect.Height-1&lt;/P&gt;&lt;P&gt;&amp;nbsp; zhibao=CellMatrix(RowIter)(0).Text &lt;/P&gt;&lt;P&gt;&amp;nbsp; xiaxiang=CellMatrix(RowIter)(1).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; shangxiang=CellMatrix(RowIter)(2).Text&lt;/P&gt;&lt;P&gt;&amp;nbsp; sqlstr="insert into tab1(ID,Name,Age) values('"&amp;amp;zhibao&amp;amp;"','"&amp;amp;xiaxiang&amp;amp;"','"&amp;amp;shangxiang&amp;amp;"')" &lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.execute sqlstr&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp; next&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; conn.close&lt;/P&gt;&lt;P&gt;&amp;nbsp; set conn=nothing&lt;/P&gt;&lt;P&gt;&amp;nbsp; msgbox "写入成功！" &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;end sub&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/write-back-SQL-server-database-when-using-odbc-but-not-working/m-p/658344#M240248</guid>
      <dc:creator />
      <dc:date>2014-08-12T07:46:19Z</dc:date>
    </item>
    <item>
      <title>Re: write back  SQL server database when using odbc,but not working???</title>
      <link>https://community.qlik.com/t5/QlikView/write-back-SQL-server-database-when-using-odbc-but-not-working/m-p/658345#M240249</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Is the DSN configured to allow read and write operations? Make sure in the "Data Sources (ODBC)" tool that the driver you are using has the permissions correctly.&lt;/P&gt;&lt;P&gt;Apart from that, verify that the user specified in the DSN has permissions to write in the tables.&lt;/P&gt;&lt;P&gt;miguel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Aug 2014 07:49:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/write-back-SQL-server-database-when-using-odbc-but-not-working/m-p/658345#M240249</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2014-08-12T07:49:01Z</dc:date>
    </item>
  </channel>
</rss>

