<?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 Re: Qlik Macro - connect Access DB with vbs in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367319#M614871</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks m w- I've done all that. I think the problem lies in that Qlik is 64-bit so it's trying to use the 64-bit driver, so it can't find my 32-bit office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried forcing it to call 32-bit and I've found some suggestions to use windows scripting (wscript) to accomplish that, but the qlik vb editor isn't recognizing wscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, anyone talking about forcing a 32-bit connection is talking about doing it from the command prompt which is why this becomes a Qlik specific question. If Qlik affords a way to force call a 32-bit OLE or ODBC connection- it would be so easy, but it seems not many want to do this. If I could do it, it would solve the woes of 3 major processes within my company.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jul 2017 14:16:17 GMT</pubDate>
    <dc:creator>megabyte23</dc:creator>
    <dc:date>2017-07-12T14:16:17Z</dc:date>
    <item>
      <title>Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367315#M614867</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've scoured the forums today and am finding no love. I'm trying to connect to an Access database with OLE.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the code tries to open the connection, the error is:&lt;/P&gt;&lt;P&gt;Provider cannot be found. It may not be properly installed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've installed the Microsoft Access Redistributable package. I understand the issue to be with bits.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my config:&lt;/P&gt;&lt;P&gt;Windows: 64-bit&lt;/P&gt;&lt;P&gt;Qlik: 64-bit&lt;/P&gt;&lt;P&gt;Office: 32-bit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I really can't change any of these, unfortunately due to our required environment. Is this impossible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your advise.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Jul 2017 21:56:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367315#M614867</guid>
      <dc:creator>megabyte23</dc:creator>
      <dc:date>2017-07-11T21:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367316#M614868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/videos/5176"&gt; Video Link : 5176&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 12:27:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367316#M614868</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2017-07-12T12:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367317#M614869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks- I can connect to access in the load script with no trouble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to connect from a vb macro- that's when I get the error.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 13:42:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367317#M614869</guid>
      <dc:creator>megabyte23</dc:creator>
      <dc:date>2017-07-12T13:42:47Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367318#M614870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this:&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.minnesotaithub.com/2014/06/how-to-connect-to-access-database-with-vbscript/" title="http://www.minnesotaithub.com/2014/06/how-to-connect-to-access-database-with-vbscript/"&gt;How to Connect to Access Database with VBScript&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367318#M614870</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2017-07-12T14:07:38Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367319#M614871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks m w- I've done all that. I think the problem lies in that Qlik is 64-bit so it's trying to use the 64-bit driver, so it can't find my 32-bit office.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried forcing it to call 32-bit and I've found some suggestions to use windows scripting (wscript) to accomplish that, but the qlik vb editor isn't recognizing wscript.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise, anyone talking about forcing a 32-bit connection is talking about doing it from the command prompt which is why this becomes a Qlik specific question. If Qlik affords a way to force call a 32-bit OLE or ODBC connection- it would be so easy, but it seems not many want to do this. If I could do it, it would solve the woes of 3 major processes within my company.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 14:16:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367319#M614871</guid>
      <dc:creator>megabyte23</dc:creator>
      <dc:date>2017-07-12T14:16:17Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367320#M614872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This worked for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sub ReadAccessDB&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateObject("WScript.Shell").Run "C:\Windows\SysWOW64\wscript.exe C:\Users\ra053499\Downloads\test.vbs"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;End Sub&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Here is the contents of my test.vbs:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Const adOpenStatic = 3&lt;/P&gt;&lt;P&gt;Const adLockOptimistic = 3&lt;/P&gt;&lt;P&gt;Const adUseClient = 3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;strConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &amp;amp; _&lt;/P&gt;&lt;P&gt;"Data Source=P:\Projects\Budget 2.0\Budget Reports\P31\ISD Budget.mdb;" &amp;amp; _&lt;/P&gt;&lt;P&gt;"Jet OLEDB:Database Password=spartans;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Set cn = CreateObject("ADODB.Connection")&lt;/P&gt;&lt;P&gt;Set rs = CreateObject("ADODB.Recordset")&lt;/P&gt;&lt;P&gt;Set rs1 = CreateObject("ADODB.Recordset")&lt;/P&gt;&lt;P&gt;ON ERROR RESUME NEXT&lt;/P&gt;&lt;P&gt;cn.Open strConnection&lt;/P&gt;&lt;P&gt;if err.number&amp;gt;0 then&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox err.description&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; msgbox "Error accessing the budget database. Try again later."&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;end if&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs.CursorLocation = adUseClient&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs.Open "SELECT * FROM CoverSheet where Snapshot = ""Current""" , cn, adOpenStatic, adLockOptimistic&lt;/P&gt;&lt;P&gt;strSQL = "SELECT * FROM CoverSheet where Snapshot = """ &amp;amp; strSnapshot &amp;amp; """"&lt;/P&gt;&lt;P&gt;rs1.Open strSQL , cn, adOpenStatic, adLockOptimistic&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if rs.Recordcount &amp;gt; 0 then&amp;nbsp;&amp;nbsp; ' delete existing snapshot data for today&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rs.MoveFirst&lt;/P&gt;&lt;P&gt;end if&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;msgbox rs.Fields("BudgetAllotment").Value&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;rs.Close&lt;/P&gt;&lt;P&gt;cn.Close&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 16:24:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367320#M614872</guid>
      <dc:creator>m_woolf</dc:creator>
      <dc:date>2017-07-12T16:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: Qlik Macro - connect Access DB with vbs</title>
      <link>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367321#M614873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It's not the most elegant thing I've ever done, but it will do the trick! Thank you m w! (Also my initials).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For future readers, I was able to combine this with arguments which are the parameters to be inserted into the Access database.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Call from Qlik Module:&lt;/P&gt;&lt;P&gt;Sub WriteAccessDB&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; CreateObject("WScript.Shell").Run "C:\Windows\SysWOW64\wscript.exe C:\ScriptName.vbs&amp;nbsp; ""param 1"" ""param 2"""&lt;/P&gt;&lt;P&gt;End Sub&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(All those quotes allow the spaces)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then in the .vbs file:&lt;/P&gt;&lt;P&gt;msgbox Wscript.Arguments(0)&lt;/P&gt;&lt;P&gt;msgbox Wscript.Arguments(1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can vba your heart away.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jul 2017 17:58:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Qlik-Macro-connect-Access-DB-with-vbs/m-p/1367321#M614873</guid>
      <dc:creator>megabyte23</dc:creator>
      <dc:date>2017-07-12T17:58:23Z</dc:date>
    </item>
  </channel>
</rss>

