<?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 Connection String in Macro in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1402601#M817430</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to call a SQL Server Stored Procedure from Qlikview Macro, but It's impossible to connect to the database. I copy and paste the same connection string that I have in the "regular" script but didn't work, I tried to create an ODBC Connection and didn't work, I tried a lot of things but I can't connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone tried to connect to a database from a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried with the answers of &lt;A href="https://community.qlik.com/qlik-users/138265" target="_blank"&gt;naveenvyas1&lt;/A&gt; in from this discussion: &lt;A href="https://community.qlik.com/thread/96188" target="_blank"&gt;Call a Stored Proc behind a button&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>jmvilaplanap</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Connection String in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1402601#M817430</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to call a SQL Server Stored Procedure from Qlikview Macro, but It's impossible to connect to the database. I copy and paste the same connection string that I have in the "regular" script but didn't work, I tried to create an ODBC Connection and didn't work, I tried a lot of things but I can't connect.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Has anyone tried to connect to a database from a macro?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried with the answers of &lt;A href="https://community.qlik.com/qlik-users/138265" target="_blank"&gt;naveenvyas1&lt;/A&gt; in from this discussion: &lt;A href="https://community.qlik.com/thread/96188" target="_blank"&gt;Call a Stored Proc behind a button&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1402601#M817430</guid>
      <dc:creator>jmvilaplanap</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Connection String in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1402602#M817431</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/156537"&gt;jmvilaplanap&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm you in the future (well, really you are me in the past),&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It's done, it was not so difficult, it didn't work because you was not using the right objects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here you have an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dim objCommand&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dim objField&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dim objRecordSet&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dim rowsExported&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Dim rowsOriginal&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Set objConnection = CreateObject("adodb.connection")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Set objCommand= CreateObject("adodb.command")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;Set objRecordSet= CreateObject("ADODB.RECORDSET")&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;objConnection.Open "Provider=sqloledb;Data Source=dev-sql-int04;Initial Catalog=db;User Id=usr;Password=pass;"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;objCommand.CommandText = "SELECT count(*) FROM table"&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Aug 2017 15:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1402602#M817431</guid>
      <dc:creator>jmvilaplanap</dc:creator>
      <dc:date>2017-08-30T15:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Connection String in Macro</title>
      <link>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1994222#M1221298</link>
      <description>&lt;P&gt;Hi&amp;nbsp; is it working&amp;nbsp; Script&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Oct 2022 03:59:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Connection-String-in-Macro/m-p/1994222#M1221298</guid>
      <dc:creator>chetanpatel</dc:creator>
      <dc:date>2022-10-19T03:59:38Z</dc:date>
    </item>
  </channel>
</rss>

