<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Reporting - Microsoft Access Archives | ZappySys Blog</title>
	<atom:link href="https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/bi-reporting-access/feed/" rel="self" type="application/rss+xml" />
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/bi-reporting-access/</link>
	<description>SSIS / ODBC Drivers / API Connectors for JSON, XML, Azure, Amazon AWS, Salesforce, MongoDB and more</description>
	<lastBuildDate>Wed, 17 Jan 2024 11:26:44 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.4.4</generator>

<image>
	<url>https://zappysys.com/blog/wp-content/uploads/2023/01/cropped-zappysys-symbol-large-32x32.png</url>
	<title>Reporting - Microsoft Access Archives | ZappySys Blog</title>
	<link>https://zappysys.com/blog/category/odbc-powerpack/odbc-app-integration/bi-reporting-access/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</title>
		<link>https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 27 Jul 2019 06:34:32 +0000</pubDate>
				<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[hana]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[odata]]></category>
		<category><![CDATA[s/4hana]]></category>
		<category><![CDATA[sap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7506</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to read JIRA data in SQL Server. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use ODBC XML Driver to read SAP data and load [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" target="_blank" rel="noopener"><img decoding="async" class="alignleft wp-image-7491 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/07/SAP_S4HANA.png" alt="SAP S/4HANA" width="150" height="150" /></a></p>
<p>In our previous blog we saw how to <a href="https://zappysys.com/blog/load-jira-data-sql-server-odbc-call-rest-api/" target="_blank" rel="noopener">read JIRA data in SQL Server</a>. Now let’s learn how to Import SAP S/4HANA OData Service Data Into MS Access. SAP S/4HANA provides OData REST API interface to access data in your application using HTTP Protocol. We will use <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML Driver</a> to read SAP data and load into MS Access.</p>
<p>So, let’s get started.</p>
<div id="custom_post_widget-2523" class="content_block">
<h2></h2>
<h2></h2>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>A first requirement, make sure that Microsoft Access installed</li>
<li>Finally, make sure to have <a href="https://zappysys.com/products/odbc-powerpack/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
</ol>
</div>
<h2><span id="About_SAP_HANA_OData_REST_API_Service">About SAP HANA / OData REST API Service</span></h2>
<p>You can expose your SAP Data using ODATA REST API Service. Here is a <a href="https://www.erpworkbench.com/sap-webapps/segw-odata-gateway-service.htm" target="_blank" rel="noopener">good article</a> which shows how to expose data as OData Service.   For more information on SAP OData Service feature check this <a href="https://help.sap.com/doc/05d53b2d3bbb43d2ab5efa23829b2777/1610%20001/en-US/frameset.htm?ecaeea50ca692309e10000000a445394.html" target="_blank" rel="noopener">SAP help page</a>. If you are new to OData Standard then <a href="https://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">read here</a> to know more how OData can facilitate data extraction using HTTP REST API. If you need Sample XML based OData Service then use below test URLs.</p><pre class="crayon-plain-tag">https://services.odata.org/Northwind/Northwind.svc/
https://services.odata.org/Northwind/Northwind.svc/Customers
https://services.odata.org/Northwind/Northwind.svc/Orders
https://services.odata.org/Northwind/Northwind.svc/Invoices
https://services.odata.org/Northwind/Northwind.svc/Products</pre><p>
Now let’s look at how to read SAP Data using ODBC Driver. At this point we assume you have exposed your data as OData Endpoint.</p>
<h2><span id="Read_SAP_HANA_data_using_XML_Source">Read SAP S/4HANA data using XML Driver</span></h2>
<p>First let’s look at steps to configure XML Driver. We will read data from SAP S/4HANA OData Service and then in next section we will look at how to load data into MS Access or other target.</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img fetchpriority="high" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div></li>
<li>In this step, create the new data source, select <strong>ZappySys XML Driver.</strong>
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys xml driver</p></div></li>
<li>Now edit that XML data source to configure it. Enter your OData Service URL its typically like below. Replace 3 parts with your own value (i.e. replace {MY-INSTANCE},  {MY-PROJECT}, {MY-TABLE})<br />
<pre class="crayon-plain-tag">https://{MY-INSTANCE}/sap/opu/odata/sap/{MY-PROJECT}/{MY-TABLE}</pre>
For example if you are hosting SAP HANA in Cloud Instance then your URL may look like below<br />
<pre class="crayon-plain-tag">https://myXXXXXX-api.s4hana.ondemand.com/sap/opu/odata/sap/MyTestProject/PurchaseOrders</pre>
And create New ZS-HTTP connection in it select <a href="https://zappysys.com/blog/how-to-set-base64-encoded-authorization-header-for-http-web-request/" target="_blank" rel="noopener">Basic Authentication</a> and enter your SAP HANA UserID / Password to call OData Service and select the desire filter.</p>
<div id="attachment_7497" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7497" class="wp-image-7497 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png" alt="XML Driver : SAP S/4HANA OData Service Configuration" width="720" height="503" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-768x537.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service-300x210.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-xml-driver-sap-hana-odata-service.png 1019w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7497" class="wp-caption-text">XML Driver : SAP S/4HANA OData Service Configuration</p></div></li>
<li>Now go to Data Format / Compression (Zip/GZip) tab and select Data Format as OData to get all the records.
<div id="attachment_7498" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7498" class="wp-image-7498 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png" alt="Data Format : Odata" width="720" height="418" srcset="https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-768x446.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format-300x174.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/07/odbc-driver-select-odata-data-format.png 792w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7498" class="wp-caption-text">Data Format : Odata</p></div></li>
<li>Finally, now using Query Builder and Code Generator we will generate the query and click on Preview the data.
<div id="attachment_6416" style="width: 766px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-6416" class="wp-image-6416 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png" alt="odbc-json-driver-generate-quickbooks-query" width="756" height="432" srcset="https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query.png 756w, https://zappysys.com/blog/wp-content/uploads/2019/01/odbc-json-driver-generate-quickbooks-query-300x171.png 300w" sizes="(max-width: 756px) 100vw, 756px" /></a><p id="caption-attachment-6416" class="wp-caption-text">Generate Query</p></div></li>
<li>That’s it we are ready to load SAP S/4HANA OData Service data to MS Access.</li>
</ol>
<h2>Load SAP S/4HANA OData Service in MS Access</h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="wp-image-5172 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="wp-image-5223 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="wp-image-5174 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="wp-image-5175 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>That&#8217;s it If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="wp-image-5176 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to link REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then at last it&#8217;s asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique Record identifier</p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">SAP S/4HANA Integration with Other BI Tools</span></h2>
<div class="content_block" id="custom_post_widget-7051">ZappySys ODBC Drivers built using ODBC standard which is widely adopted by industry for a long time. Which mean the majority of BI Tools / Database Engines / ETL Tools already there will support native / 3rd party ODBC Drivers. Below is the small list of most popular tools / programming languages our Drivers support. If your tool / programming language doesn't appear in the below list, which means we have not documented use case but as long as your tool supports ODBC Standard, our drivers should work fine.

&nbsp;

<img loading="lazy" decoding="async" class="" src="//zappysys.com/images/odbc-powerpack/odbc-powerpack-integration.jpg" alt="ZappySys ODBC Drivers for REST API, JSON, XML - Integrate with Power BI, Tableau, QlikView, QlikSense, Informatica PowerCenter, Excel, SQL Server, SSIS, SSAS, SSRS, Visual Studio / WinForm / WCF, Python, C#, VB.net, PHP. PowerShell " width="750" height="372" />
<table style="valign: top;">
<tbody>
<tr>
<td>
<p style="text-align: center;"><strong>BI / Reporting Tools
Integration</strong></p>
</td>
<td style="text-align: center;"><strong>ETL Tools
Integration
</strong></td>
<td style="text-align: center;"><strong>Programming Languages</strong>
<strong>Integration</strong></td>
</tr>
<tr>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/howto-import-json-rest-api-power-bi/" target="_blank" rel="noopener">Microsoft Power BI</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-tableau-read-json-soap-xml-csv/">Tableau</a></li>
 	<li><a href="https://zappysys.com/blog/read-rest-api-using-ssrs-reports-call-json-xml-web-service/" target="_blank" rel="noopener">SSRS (SQL Reporting Services)</a></li>
 	<li><a href="https://zappysys.com/blog/qlik-rest-connector-examples-read-json-xml-api/" target="_blank" rel="noopener">QlikView /Qlik Sense</a></li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-in-microstrategy-json-soap-xml/" target="_blank" rel="noopener">MicroStrategy</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-google-sheet-call-appscript-load-json-soap-xml-csv/" target="_blank" rel="noopener">Google Sheet</a></li>
 	<li><a href="https://zappysys.com/blog/import-json-excel-load-file-rest-api/" target="_blank" rel="noopener">Microsoft Excel</a></li>
 	<li><a href="https://zappysys.com/api/integration-hub/rest-api-connector/access?context=connector" target="_blank" rel="noopener">Microsoft Access</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li><a href="https://zappysys.com/blog/read-json-informatica-import-rest-api-json-file/" target="_blank" rel="noopener">Informatica PowerCenter</a> (Windows)</li>
 	<li>Informatica Cloud</li>
 	<li>SSIS (SQL Integration Services)</li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">SQL Server</a></li>
 	<li><a href="https://zappysys.com/blog/read-write-rest-api-data-in-talend-json-xml-soap/" target="_blank" rel="noopener">Talend Data Studio</a></li>
 	<li><a href="https://zappysys.com/blog/pentaho-read-rest-api-in-pentaho/" target="_blank" rel="noopener">Pentaho Kettle</a></li>
 	<li>Oracle OBIEE</li>
 	<li>Many more (not in this list).....</li>
</ul>
</td>
<td>
<ul>
 	<li>Visual Studio</li>
 	<li><a href="https://zappysys.com/blog/calling-rest-api-in-c/" target="_blank" rel="noopener">C#</a></li>
 	<li>C++</li>
 	<li><a href="https://zappysys.com/blog/connect-java-to-rest-api-json-soap-xml/" target="_blank" rel="noopener">JAVA</a></li>
 	<li><a href="https://zappysys.com/blog/set-rest-python-client/" target="_blank" rel="noopener">Python</a></li>
 	<li>PHP</li>
 	<li><a href="https://zappysys.com/blog/call-rest-api-powershell-script-export-json-csv/" target="_blank" rel="noopener">PowerShell</a></li>
 	<li><a href="https://zappysys.com/blog/import-rest-api-json-sql-server/" target="_blank" rel="noopener">T-SQL (Using Linked Server)</a></li>
</ul>
</td>
</tr>
</tbody>
</table>
&nbsp;</div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Step-by-Step_Import_REST_API_into_Power_BI">Conclusion</span></h2>
<p>So in this blog, we learned how to Import SAP S/4HANA OData Service Data in Access using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a> in a very simple way. You can achieve many more functionalities with this tool. Check our blogs/articles on <strong><a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">XML File / REST API Driver</a> </strong>to find out what <em>this tool</em> is capable of more.</p>
<h2><span id="References">References</span></h2>
<p>Finally, you can use the following links for more information about the use of SAP S/4HANA OData Service with our tools:</p>
<ul>
<li><a href="https://api.sap.com/" target="_blank" rel="noopener">SAP API Business Hub</a></li>
<li><strong>Landing Page</strong> for <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">ODBC XML / SOAP API Driver</a>, you can also find <a href="https://youtu.be/iwezz0Z3D4U" target="_blank" rel="noopener">Tutorial Video</a> here.</li>
<li><strong>Help File:</strong> Documentation of XML Driver.</li>
<li><strong>Blog/articles link</strong>: <a href="https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/" target="_blank" rel="noopener">https://zappysys.com/blog/category/odbc-powerpack/odbc-drivers/xml-soap-api-driver/</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-sap-s-4hana-odata-service-data-ms-access-via-odbc-driver/">Import SAP S/4HANA OData Service Data Into Ms Access via ODBC Driver</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>How to Export REST API to MS Access using VBA Command Button</title>
		<link>https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 29 Jun 2019 09:34:55 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[REST API]]></category>
		<category><![CDATA[command button]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[odbc]]></category>
		<category><![CDATA[vba]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7317</guid>

					<description><![CDATA[<p>Introduction In our previous blog we saw how to export REST API to CSV using c# or Python. In this post we will look at specific example on How to Export REST API to MS Access using VBA Command Button, along with few other topics such as how to make REST API Call, how to [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/">How to Export REST API to MS Access using VBA Command Button</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" class="alignleft wp-image-7318 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250-150x150.png" alt="VBA" width="150" height="150" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250-150x150.png 150w, https://zappysys.com/blog/wp-content/uploads/2019/06/VBA_250x250.png 250w" sizes="(max-width: 150px) 100vw, 150px" /></a>In our previous blog we saw how to <a href="https://zappysys.com/blog/how-to-export-rest-api-to-csv/" target="_blank" rel="noopener">export REST API to CSV using c# or Python</a>. In this post we will look at specific example on <strong>How to Export REST API to MS Access using VBA Command Button</strong>, along with few other topics such as how to make <strong>REST API Call</strong>, how to read all Customers data from Odata using our ODBC JSON Driver and load it into the Ms Access Table.</p>
<p>We will go through the steps to read data from Odata and Load into MS Access using VBA Command Button.</p>
<p>In nutshell, this post will focus on how to make ODBC Driver Call using VBA.</p>
<p>So let’s get started.</p>
<h2><span id="Requirements">Requirements</span></h2>
<ol>
<li>First of all, you will need <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC PowerPack</a> installed.</li>
<li>Secondly, Make sure that Microsoft Access installed for VBA example.</li>
</ol>
<h2><span id="An_introduction_to_Rest_API_and_OData">An introduction to Rest API and OData</span></h2>
<p>In this example, we will use OData (Open Data Protocol) to consume REST API. REST API (Representational State Transfer Application Program Interface) allows handling the interoperability between computers and the internet.</p>
<p>In REST API we can handle web services in different formats. In this example, we will work with the Northwind example. The Northwind example is available in this URL:</p>
<div id="crayon-5bc180f1dd015720033381" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre>
</div>
</div>
<ol>
<li>By default, the data is displayed in XML format. To show the data in JSON use this URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, Invoices, etc. For example, the following URL will show the data of the categories collection:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<h2><span id="Configure_ODBC_DSN_for_ZappySys_JSON_Driver">Configure ODBC DSN for ZappySys JSON Driver</span></h2>
<p>ODBC driver can be accessed in two modes.</p>
<ol>
<li>Using DSN</li>
<li>Without DSN (Supply direct Connection String e.g. <strong>DRIVER={ZappySys JSON Driver}; ……..</strong> )</li>
</ol>
<p>In this article, we will use the DSN approach (User DSN). We will first add the ZappySys JSON Driver in the ODBC Data Source Administrator.</p>
<p>Follow these steps to accomplish the task:</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" class="wp-caption aligncenter">
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div>
</div>
</li>
<li>In this step, create the new data source, select <strong>ZappySys JSON Driver.</strong>
<div id="attachment_2772" class="wp-caption aligncenter">
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></div>
</div>
</li>
<li>Here we have several properties, write a data source name. In this example, the name will be ZappySys JSON to Excel.</li>
<li>The Data Source (URL or file path) can specify the URL of the source or if it is a local file, you can specify the local path. In this example, the URL is:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json</pre>
You can also specify a local file path as Data SourceFor a single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Configure the ODBC JSON Driver like this and test the connection:
<div id="attachment_7321" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7321" class="wp-image-7321 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-768x698.png" alt="Configure JSON Driver for REST API Call" width="720" height="654" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-768x698.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration-300x273.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-odata-configuration.png 849w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7321" class="wp-caption-text">Configure JSON Driver for REST API Call</p></div></li>
<li>Now click on Copy Connection string Button.
<div id="attachment_7322" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7322" class="wp-image-7322 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-768x672.png" alt="ODBC Driver : Copy Connection String" width="720" height="630" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-768x672.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-driver-copy-connection-string.png 802w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7322" class="wp-caption-text">ODBC Driver : Copy Connection String</p></div></li>
<li>That&#8217;s it Connection string is copied to clipboard. Now let&#8217;s use this connection string in the VBA code.</li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to import REST API data to Access using VBA</span></h2>
<ol>
<li>Open the access database and create the table with the desire columns to get API data in it.
<div id="attachment_7324" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7324" class="wp-image-7324 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-768x511.png" alt="Create Table in Access" width="720" height="479" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-768x511.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-300x200.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-1024x682.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access-272x182.png 272w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-table-in-access.png 1546w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7324" class="wp-caption-text">Create Table in Access</p></div></li>
<li>Now close the table, and go to Create menu and click on Form Design to add the new blank form in design view.
<div id="attachment_7325" style="width: 642px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7325" class="wp-image-7325 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png" alt="Access : Create a New Form in Design View" width="632" height="402" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access.png 632w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-create-form-desing-access-300x191.png 300w" sizes="(max-width: 632px) 100vw, 632px" /></a><p id="caption-attachment-7325" class="wp-caption-text">Access : Create a New Form in Design View</p></div></li>
<li>It will open the new form in the design view, now add new button with the desire text.
<div id="attachment_7326" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7326" class="wp-image-7326 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-768x459.png" alt="Access : Add Command Button" width="720" height="430" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-768x459.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-300x179.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button-1024x612.png 1024w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-add-access-command-button.png 1215w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7326" class="wp-caption-text">Access : Add Command Button</p></div></li>
<li>Now right click on button and go to properties and click on &#8230; builder button and select Code Builder.
<div id="attachment_7327" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access.png" target="_blank" rel="noopener"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7327" class="wp-image-7327 size-medium_large" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-768x529.png" alt="Access : Code builder" width="720" height="496" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-768x529.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access-300x207.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-select-code-builder-access.png 934w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7327" class="wp-caption-text">Access : Code builder</p></div></li>
<li>When you click the button, it will open a new VBA instance, executing the command event associated with that button click.<br />
Next, insert the provided code inside the <i>Command5_Click()</i> function. In this example, the button is named Command5, and that&#8217;s why it&#8217;s added within this click function.<br />
The provided code encompasses the following steps:</p>
<ol>
<li><strong>Ensure the table is closed:</strong><br />
It&#8217;s crucial to close the table beforehand; otherwise, executing the subsequent command may result in an error.</li>
<li><strong>Truncate the table:<br />
</strong>Clear the existing data from the table. If you want to add fresh data each time</li>
<li><strong>Make the API call:<br />
</strong>Utilize the ODBC Driver connection string to initiate an API call.</li>
<li><strong>Insert into the Access table:<br />
</strong>Use the retrieved data from the API call to insert new records into the Access table.</li>
<li><strong>Open the table:<br />
</strong>Reopen the table to inspect the newly inserted data.</li>
</ol>
<pre class="crayon-plain-tag">' Pass your ZappySys Driver Connection String: Refer to below link to learn how to obtain the ZappySys Driver connection string:
    ' https://community.zappysys.com/t/how-to-copy-the-zappysys-driver-connection-string/172
    Dim zsConnStr As String
    zsConnStr = "DRIVER={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';Filter='$.value[*]';IncludeParentColumns=0;RequestMethod='GET';RequestHeaders='cache-control: no-cache || Accept: */*'"
        
    'ZappySys Driver Query
    Dim zsDriverQuery As String
    zsDriverQuery = "Select * from $"
 
    'MS Access Table Name
    Dim tableName As String
    tableName = "tblCustomers"

    ' 1. Close Table If Open
    CloseTableIfOpen tableName

    ' 2. Truncate Table (Optional): If you want to load fresh data each time, uncomment the line below.
    'TruncateTable tableName

    ' 3. Import Data From API Into Table
    ImportDataFromAPIIntoTable zsConnStr, zsDriverQuery, tableName

    ' 4. Open Table for Viewing (Optional)
    OpenTableForViewing tableName

    ' Show Message after Loading Data Successfully
    MsgBox "Data Loaded Successfully!"</pre>
<div id="attachment_10917" style="width: 744px" class="wp-caption alignnone"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-10917" class="size-full wp-image-10917" src="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png" alt="ms-access-vba-button-onclick" width="734" height="809" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick.png 734w, https://zappysys.com/blog/wp-content/uploads/2019/06/ms-access-vba-button-onclick-272x300.png 272w" sizes="(max-width: 734px) 100vw, 734px" /></a><p id="caption-attachment-10917" class="wp-caption-text">VBA Button OnClick Function</p></div>
<p>&nbsp;</li>
<li>Below the <i>Private Sub Command5_Click()</i> function, please add the necessary functions and procedures as provided below:</p><pre class="crayon-plain-tag">Sub ImportDataFromAPIIntoTable(zsConnStr As String, zsDriverQuery As String, tableName As String)
    Dim dscn As New ADODB.Connection
    dscn.Open zsConnStr

    Dim rs As Object
    Set rs = New ADODB.Recordset
    
    ''ZappySys Driver Query Goes here
    rs.Open zsDriverQuery, dscn

    Dim strQuery As String
    strQuery = ""
    ' Check if the recordset is not empty
    If Not rs.EOF Then
        ' Get the field names
        Dim fieldNames As String
        fieldNames = ""

        For i = 1 To rs.Fields.Count
            fieldNames = fieldNames &amp; rs.Fields(i - 1).Name
            If i &lt; rs.Fields.Count Then
                fieldNames = fieldNames &amp; ","
            End If
        Next i

        ' Generate the INSERT script
        Dim insertScript As String
        ' Iterate through the recordset to get the values
        Do Until rs.EOF
            ' Generate Insert script
            insertScript = "INSERT INTO " &amp; tableName &amp; " (" &amp; fieldNames &amp; ") VALUES"
            insertScript = insertScript &amp; vbCrLf &amp; "("
            For i = 1 To rs.Fields.Count
                ' Assuming all fields are text, you might need to handle different data types appropriately
                
                If IsNull(rs.Fields(i - 1).Value) Then
                    insertScript = insertScript &amp; "''"
                Else
                    insertScript = insertScript &amp; "'" &amp; EscapeSingleQuote(rs.Fields(i - 1).Value) &amp; "'"
                End If
                
                
                If i &lt; rs.Fields.Count Then
                    insertScript = insertScript &amp; ","
                End If
            Next i
            insertScript = insertScript &amp; ")"
            
            'Insert data
            CurrentProject.Connection.Execute insertScript
            
            rs.MoveNext
        Loop
    End If
    
    ' Close the recordset and connection
    rs.Close
    dscn.Close
    Set rs = Nothing
    Set conn = Nothing
    
End Sub

Sub OpenTableForViewing(tableName As String)
    If Not IsTableOpen(tableName) Then
        DoCmd.OpenTable tableName
    End If
End Sub

Public Function IsTableOpen(strName As String) As Boolean
     IsTableOpen = SysCmd(acSysCmdGetObjectState, acTable, strName)
End Function

Sub CloseTableIfOpen(tableName As String)
    If IsTableOpen(tableName) Then
        DoCmd.SelectObject acTable, tableName
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
    End If
End Sub


Sub TruncateTable(tableName As String)
    Dim strSql As String
    strSql = "DELETE FROM " &amp; tableName &amp; ";"
    CurrentProject.Connection.Execute strSql
End Sub

Public Function EscapeSingleQuote(strData As String) As String
     EscapeSingleQuote = Replace(strData, "'", "''")
End Function</pre><p>
</li>
<li>Now, save the VBA form code and provide some appropriate form names.
<div id="attachment_7332" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7332" class="size-medium_large wp-image-7332" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-768x943.png" alt="Save form vba code" width="720" height="884" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-768x943.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-244x300.png 244w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form-834x1024.png 834w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-save-form.png 849w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7332" class="wp-caption-text">Save form vba code</p></div>
<p>&nbsp;</li>
<li>Make sure to add the reference to the Microsoft ActiveX Data Objects X.0 Library in the project settings.In Microsoft Access VBA,<br />
You can add the reference to the Microsoft ActiveX Data Objects X.0 Library by following these steps:</p>
<ol>
<li>In the VBA editor, go to &#8220;Tools&#8221; in the menu and select &#8220;References.&#8221;</li>
<li>In the References dialog box, scroll down the list to find &#8220;Microsoft ActiveX Data Objects X.0 Library&#8221; (where &#8220;X.0&#8221; corresponds to the version number, such as 6.1, 2.8, etc.).</li>
<li>Check the box next to the appropriate version to enable the reference.</li>
<li>Click &#8220;OK&#8221; to save the changes and close the References dialog box.</li>
</ol>
<p>Now, your Access project has a reference to the Microsoft ActiveX Data Objects library, and you can use its features in your VBA code.</p>
<div id="attachment_7336" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7336" class="size-medium_large wp-image-7336" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-768x648.png" alt="Access : Add reference" width="720" height="608" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-768x648.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference-300x253.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-add-reference.png 804w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7336" class="wp-caption-text">Access : Add reference</p></div>
<p>If the MS ActiveX reference is not added, an error will be thrown.</p>
<div id="attachment_7335" style="width: 721px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7335" class="wp-image-7335 size-full" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324.png" alt="VBA : Error Type not defined" width="711" height="797" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324.png 711w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-vba-error-type-not-found-e1705479944324-268x300.png 268w" sizes="(max-width: 711px) 100vw, 711px" /></a><p id="caption-attachment-7335" class="wp-caption-text">VBA : Error Type not defined</p></div></li>
<li>Close the code project, open the form in Form View, and click on the button.
<div id="attachment_7333" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7333" class="size-medium_large wp-image-7333" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-768x705.png" alt="Access : Click Command Button" width="720" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-768x705.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-click-button.png 939w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7333" class="wp-caption-text">Access : Click Command Button</p></div></li>
<li>After clicking the button, it will initiate a REST API call, insert the data into the Access table, and open the table to display the inserted records along with a success message.
<div id="attachment_7334" style="width: 730px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7334" class="size-medium_large wp-image-7334" src="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-768x705.png" alt="Access : Open the table" width="720" height="661" srcset="https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-768x705.png 768w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message-300x275.png 300w, https://zappysys.com/blog/wp-content/uploads/2019/06/odbc-access-code-success-message.png 939w" sizes="(max-width: 720px) 100vw, 720px" /></a><p id="caption-attachment-7334" class="wp-caption-text">Access : Open the table</p></div></li>
</ol>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this article, we saw how to use VBA to call REST API. We show how to do REST API calls in Access using the ZappySys ODBC driver. Also, we show how to write VBA Code in MS Access for command button to make REST API call, truncate access table and insert record in the access table using VBA code. If you liked this article and you want to try, you can download the <a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC installer here</a>.</p>
<h2><span id="References">References</span></h2>
<ul>
<li><a href="https://zappysys.com/products/odbc-powerpack/download/" target="_blank" rel="noopener">ZappySys ODBC installer.</a></li>
<li><a href="https://stackoverflow.com/questions/49984642/access-odbc-query" target="_blank" rel="noopener">Access ODBC Query</a></li>
<li><a href="https://docs.microsoft.com/en-us/sql/ado/guide/appendixes/using-ado-with-microsoft-visual-basic?view=sql-server-2017" target="_blank" rel="noopener">Using ADO with Microsoft Visual Basic and Visual Basic for Applications</a></li>
</ul>
<h2>
Form VBA Code:</h2>
<p>After completing the migration of the higher-level VBA code, you&#8217;ll notice a transformation in the structure of your forms&#8217; code.</p><pre class="crayon-plain-tag">Option Compare Database

Private Sub Command5_Click()
 
    ' Pass your ZappySys Driver Connection String: Refer to below link to learn how to obtain the ZappySys Driver connection string:
    ' https://community.zappysys.com/t/how-to-copy-the-zappysys-driver-connection-string/172
    Dim zsConnStr As String
    zsConnStr = "DRIVER={ZappySys JSON Driver};DataPath='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json';Filter='$.value[*]';IncludeParentColumns=0;RequestMethod='GET';RequestHeaders='cache-control: no-cache || Accept: */*'"
        
    'ZappySys Driver Query
    Dim zsDriverQuery As String
    zsDriverQuery = "Select * from $"
 
    'MS Access Table Name
    Dim tableName As String
    tableName = "tblCustomers"

    ' 1. Close Table If Open
    CloseTableIfOpen tableName

    ' 2. Truncate Table (Optional): If you want to load fresh data each time, uncomment the line below.
    'TruncateTable tableName

    ' 3. Import Data From API Into Table
    ImportDataFromAPIIntoTable zsConnStr, zsDriverQuery, tableName

    ' 4. Open Table for Viewing (Optional)
    OpenTableForViewing tableName

    ' Show Message after Loading Data Successfully
    MsgBox "Data Loaded Successfully!"
    
End Sub

Sub ImportDataFromAPIIntoTable(zsConnStr As String, zsDriverQuery As String, tableName As String)
    Dim dscn As New ADODB.Connection
    dscn.Open zsConnStr

    Dim rs As Object
    Set rs = New ADODB.Recordset
    
    ''ZappySys Driver Query Goes here
    rs.Open zsDriverQuery, dscn

    Dim strQuery As String
    strQuery = ""
    ' Check if the recordset is not empty
    If Not rs.EOF Then
        ' Get the field names
        Dim fieldNames As String
        fieldNames = ""

        For i = 1 To rs.Fields.Count
            fieldNames = fieldNames &amp; rs.Fields(i - 1).Name
            If i &lt; rs.Fields.Count Then
                fieldNames = fieldNames &amp; ","
            End If
        Next i

        ' Generate the INSERT script
        Dim insertScript As String
        ' Iterate through the recordset to get the values
        Do Until rs.EOF
            ' Generate Insert script
            insertScript = "INSERT INTO " &amp; tableName &amp; " (" &amp; fieldNames &amp; ") VALUES"
            insertScript = insertScript &amp; vbCrLf &amp; "("
            For i = 1 To rs.Fields.Count
                ' Assuming all fields are text, you might need to handle different data types appropriately
                
                If IsNull(rs.Fields(i - 1).Value) Then
                    insertScript = insertScript &amp; "''"
                Else
                    insertScript = insertScript &amp; "'" &amp; EscapeSingleQuote(rs.Fields(i - 1).Value) &amp; "'"
                End If
                
                
                If i &lt; rs.Fields.Count Then
                    insertScript = insertScript &amp; ","
                End If
            Next i
            insertScript = insertScript &amp; ")"
            
            'Insert data
            CurrentProject.Connection.Execute insertScript
            
            rs.MoveNext
        Loop
    End If
    
    ' Close the recordset and connection
    rs.Close
    dscn.Close
    Set rs = Nothing
    Set conn = Nothing
    
End Sub

Sub OpenTableForViewing(tableName As String)
    If Not IsTableOpen(tableName) Then
        DoCmd.OpenTable tableName
    End If
End Sub

Public Function IsTableOpen(strName As String) As Boolean
     IsTableOpen = SysCmd(acSysCmdGetObjectState, acTable, strName)
End Function

Sub CloseTableIfOpen(tableName As String)
    If IsTableOpen(tableName) Then
        DoCmd.SelectObject acTable, tableName
        DoCmd.RunCommand acCmdSaveRecord
        DoCmd.Close
    End If
End Sub


Sub TruncateTable(tableName As String)
    Dim strSql As String
    strSql = "DELETE FROM " &amp; tableName &amp; ";"
    CurrentProject.Connection.Execute strSql
End Sub

Public Function EscapeSingleQuote(strData As String) As String
     EscapeSingleQuote = Replace(strData, "'", "''")
End Function</pre><p>
&nbsp;</p>
<h2></h2>
<p>The post <a href="https://zappysys.com/blog/export-rest-api-ms-access-using-vba-command-button/">How to Export REST API to MS Access using VBA Command Button</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>ODBC PowerPack v1.1.3 Released</title>
		<link>https://zappysys.com/blog/odbc-powerpack-v1-1-3/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Tue, 25 Jun 2019 13:35:30 +0000</pubDate>
				<category><![CDATA[Announcements]]></category>
		<category><![CDATA[ETL - Informatica]]></category>
		<category><![CDATA[ODBC Gateway]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=7296</guid>

					<description><![CDATA[<p>What&#8217;s New In this release we focused on adding URL JOIN Features which may allow many multi steps scenarios in one query. Bing Ads, Amazon MWS, Google BigQuery, Amazon Athena all these supports Job style queries which needs 3 step process (Create job, keep checking status, once done read report data). We also improved compatibility [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/odbc-powerpack-v1-1-3/">ODBC PowerPack v1.1.3 Released</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2>What&#8217;s New</h2>
<p>In this release we focused on adding URL JOIN Features which may allow many multi steps scenarios in one query. Bing Ads, Amazon MWS, Google BigQuery, Amazon Athena all these supports Job style queries which needs 3 step process (Create job, keep checking status, once done read report data). We also improved compatibility with Informatica and MS Access.</p>
<h2 class="vertitle">Version 1.1.3.10621 [Jun 24, 2019]</h2>
<h3 class="versubtitle">New Features/Improvements</h3>
<ul>
<li><span class="verAdded">NEW: </span>Add option to replace placeholders in File content if you use IsMultiPart = True</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add option EnableBodyPlaceholderForMultiPart to support replacing placeholders in file content in IsMultiPart mode (E.g. replace &lt;%access_token%&gt; or [$token$] or [$alias.MyJoinColumn$] )</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add option OutputAsRawDocumentSingleRow (Returns __DOCUMENT__ field with entire File / Response string in one field)</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Options to parse from any unstructured data &#8211; RawOutputExtractMode, RawOutputDataRowTemplate, RawOutputFilterExpr</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Status Check feature for all API drivers (Keep sending request until desired value found) &#8211; Options added EnableStatusCheck, StatucCheckMaxWaitSeconds, StatucCheckIterationWaitSeconds, StatusSuccessValue, StatusFailureValue</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add support for ConnectionType in URL Join</li>
<li><span class="verAdded">NEW: </span>All API Drivers &#8211; Add Support for HMAC Authentication</li>
<li><span class="verAdded">NEW: </span>All ODBC Drivers &#8211; Add support for Parameters</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Add Code Generator UI for SQL / Java</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Allow to add firewall rule via UI</li>
<li><span class="verAdded">NEW: </span>Data Gateway &#8211; Better logging about connected devices</li>
<li><span class="verAdded">NEW: </span>Salesforce Driver &#8211; Add support for Select * FROM</li>
</ul>
<h3 class="versubtitle">Bug fixes</h3>
<ul>
<li><span class="verFixed">FIX: </span>All API Drivers &#8211; joinXX_DataConnectionType Option not supported in JOIN URL</li>
<li><span class="verFixed">FIX: </span>All API Drivers- Show meaningful error when same option used twice in WITH clause (Right now you see odd error &#8211; An item with the same key has already been added)</li>
<li><span class="verFixed">FIX: </span>Apps &#8211; Informatica &#8211; Driver may output many extra empty rows in some cases</li>
<li><span class="verFixed">FIX: </span>Apps &#8211; MS Access &#8211; Linked table throwing call fail error (due to missing support for parameters in current driver)</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Certain errors not reported correctly back to caller</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Enabling caching options may hang query in some case</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; Generic ODBC Connection Type fails with error Connection is Busy</li>
<li><span class="verFixed">FIX: </span>Data Gateway &#8211; When you use Meta option in WITH clause you may see empty rowset rather error in some cases</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Can not load table list in Excel / Power BI</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Failed to preview data in Power BI</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Load ConnectionString doesnt set Username</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; Nested queries not supported &#8211; You may get syntax error</li>
<li><span class="verFixed">FIX: </span>Salesforce Driver &#8211; SSIS ODBC destination showing bad Table names in list</li>
</ul>
<p>The post <a href="https://zappysys.com/blog/odbc-powerpack-v1-1-3/">ODBC PowerPack v1.1.3 Released</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Import REST API in MS Access (Load JSON / SOAP XML)</title>
		<link>https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/</link>
		
		<dc:creator><![CDATA[ZappySys]]></dc:creator>
		<pubDate>Sat, 13 Oct 2018 05:31:43 +0000</pubDate>
				<category><![CDATA[JSON File / REST API Driver]]></category>
		<category><![CDATA[ODBC Drivers]]></category>
		<category><![CDATA[ODBC PowerPack]]></category>
		<category><![CDATA[Reporting - Microsoft Access]]></category>
		<category><![CDATA[XML File / SOAP API Driver]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[ms access]]></category>
		<category><![CDATA[rest api]]></category>
		<category><![CDATA[soap]]></category>
		<category><![CDATA[xml]]></category>
		<guid isPermaLink="false">https://zappysys.com/blog/?p=5166</guid>

					<description><![CDATA[<p>Introduction In this post, we will learn how to import REST API in MS Access (JSON or SOAP XML data).  We will use ODBC PowerPack to connect and query a JSON file / URL. JSON stands for JavaScript Object Notation and it is an Open and Standard format to read an object with attributes and values.  JSON [&#8230;]</p>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/">Import REST API in MS Access (Load JSON / SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<h2><span id="Introduction">Introduction</span></h2>
<p><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/json-to-access-import-logo.png"><img loading="lazy" decoding="async" class="alignleft wp-image-5178 size-thumbnail" src="https://zappysys.com/blog/wp-content/uploads/2018/10/json-to-access-import-logo-150x150.png" alt="json to access logo" width="150" height="150" /></a></p>
<p>In this post, we will learn how to import REST API in MS Access (JSON or SOAP XML data).  We will use <a href="https://zappysys.com/products/odbc-powerpack/">ODBC PowerPack</a> to connect and query a JSON file / URL.</p>
<p>JSON stands for JavaScript Object Notation and it is an Open and Standard format to read an object with attributes and values.  JSON is replacing XML because it is faster to read data, it is easier to parse data, it does not require end tags, it is shorter and it can use arrays.</p>
<p>We will load the data using the <a href="https://zappysys.com/products/odbc-powerpack/odbc-json-rest-api-driver/" target="_blank" rel="noopener">ZappySys JSON / REST API driver</a> and then import the data in Access. You can use similar techniques to load SOAP Data using <a href="https://zappysys.com/products/odbc-powerpack/odbc-xml-soap-api-driver/" target="_blank" rel="noopener">XML / SOAP Driver</a>.</p>
<p>&nbsp;</p>
<h2><span id="Requirements">Requirements</span></h2>
<p>This article assumes the following requirements are met before you can follow the steps listed in this article.</p>
<ol>
<li>Make sure that Microsoft Access installed</li>
<li>Also, the driver <a href="https://zappysys.com/products/odbc-powerpack/download/">ODBC PowerPack</a> installed</li>
</ol>
<h2><span id="An_introduction_to_Rest_API_and_OData">An introduction to Rest API and OData</span></h2>
<p>In this example, we will use OData (Open Data Protocol) to consume REST API. REST API (Representational State Transfer Application Program Interface) allows handling the interoperability between computers and the internet.</p>
<p>In REST API we can handle web services in different formats. In this example, we will work with the Northwind example. The Northwind example is available in this URL:</p>
<div id="crayon-5bc180f1dd015720033381" class="crayon-syntax crayon-theme-vs2012 crayon-font-courier-new crayon-os-pc print-yes notranslate">
<div class="crayon-main">
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc</pre>
</div>
</div>
<ol>
<li>By default, the data is displayed in XML format. To show the data in JSON use this URL:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/?$format=json</pre>
</li>
<li>There are collections of data like Categories, CustomerDemographic, Customers, Invoices, etc. For example, the following URL will show the data of the categories collection:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Categories?$format=json</pre>
</li>
<li>In the next steps, we will use ZappySys drivers to connect to this URL and query using OData.</li>
</ol>
<h2><span id="Configure_ODBC_DSN_for_ZappySys_JSON_Driver">Configure ODBC DSN for ZappySys JSON Driver</span></h2>
<p>ODBC driver can be accessed in two modes.</p>
<ol>
<li>Using DSN</li>
<li>Without DSN (Supply direct Connection String e.g. <strong>DRIVER={ZappySys JSON Driver}; ……..</strong> )</li>
</ol>
<p>In this article, we will use the DSN approach (User DSN). We will first add the ZappySys JSON Driver in the ODBC Data Source Administrator.</p>
<p>Follow these steps to accomplish the task:</p>
<ol>
<li>First, <strong>Windows search</strong>, write <strong>ODBC</strong> and select the <strong>ODBC Data sources (32 bits)</strong>
<div id="attachment_2780" class="wp-caption aligncenter">
<div id="attachment_2780" style="width: 395px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2780" class="wp-image-2780 size-full" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/open-ODBC-Data-souce-administrator.png?zoom=0.8999999761581421&amp;resize=385%2C520&amp;ssl=1" alt="Open ODBC Data source" width="385" height="520" /></a><p id="caption-attachment-2780" class="wp-caption-text">Open ODBC Data Source</p></div>
</div>
</li>
<li>As a second step, in ODBC Data source Administrator press the <strong>Add</strong> button.
<div id="attachment_2725" class="wp-caption aligncenter">
<div id="attachment_2725" style="width: 600px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2725" class="wp-image-2725 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png" alt="Add ZappySys" width="590" height="423" srcset="https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys.png 590w, https://zappysys.com/blog/wp-content/uploads/2018/03/add-ZappySys-300x215.png 300w" sizes="(max-width: 590px) 100vw, 590px" /></a><p id="caption-attachment-2725" class="wp-caption-text">Add ZappySys</p></div>
</div>
</li>
<li>In this step, create the new data source, select <strong>ZappySys ODBC Driver.</strong>
<div id="attachment_2772" class="wp-caption aligncenter">
<div id="attachment_2772" style="width: 302px" class="wp-caption aligncenter"><a href="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?ssl=1"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-2772" class="wp-image-2772 size-medium" src="https://i1.wp.com/zappysys.com/blog/wp-content/uploads/2018/03/create-new-data-source-zappysys-json-driver.png?zoom=0.8999999761581421&amp;resize=292%2C218&amp;ssl=1" alt="add new zappysys" width="292" height="217" /></a><p id="caption-attachment-2772" class="wp-caption-text">Add new zappysys json driver</p></div>
</div>
</li>
<li>Here we have several properties, write a data source name. In this example, the name will be ZappySys JSON to Excel.</li>
<li>The Data Source (URL or file path) can specify the URL of the source or if it is a local file, you can specify the local path. In this example, the URL is:<br />
<pre class="crayon-plain-tag">https://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json</pre>
You can also specify a local file path as Data SourceFor a single file:  c:\data\myfile_1.json<br />
For multiple files: c:\data\myfile_*.json</li>
<li>Configure the ODBC JSON Driver like this:
<div id="attachment_5169" style="width: 812px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5169" class="wp-image-5169 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png" alt="Configure JSON Driver for REST API Call" width="802" height="702" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration.png 802w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration-300x263.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/odbc-JSON-driver-configuration-768x672.png 768w" sizes="(max-width: 802px) 100vw, 802px" /></a><p id="caption-attachment-5169" class="wp-caption-text">Configure JSON Driver for REST API Call</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel"><a id="how-to-import-data"></a>How to <em><span style="text-decoration: underline;">import</span></em> REST API data to Access</span></h2>
<ol>
<li>In MS Access, go to <strong>External Data</strong> Ribbon and select <strong>New Data Source</strong> and select <strong>From Other Sources</strong> and <strong>ODBC Database</strong>.
<div id="attachment_5171" style="width: 1235px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5171" class="wp-image-5171 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png" alt="Configuration in MS Access: Import Data From REST API" width="1225" height="572" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database.png 1225w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-300x140.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-768x359.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/access-blank-database-import-data-from-odbc-database-1024x478.png 1024w" sizes="(max-width: 1225px) 100vw, 1225px" /></a><p id="caption-attachment-5171" class="wp-caption-text">A configuration in MS Access: Import Data From REST API</p></div></li>
<li>Select the Source and destination of the data, select <strong>Import the source data into a new table in the current database</strong> and press OK.
<div id="attachment_2726" class="wp-caption alignnone">
<div id="attachment_5172" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5172" class="size-full wp-image-5172" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png" alt="Get External Data - ODBC Database" width="736" height="543" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-from-odbc-300x221.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5172" class="wp-caption-text">Get External Data &#8211; ODBC Database</p></div>
</div>
</li>
<li>Select your newly created JSON Driver from the Machine Data Source and click<strong><strong><strong> OK.<br />
</strong></strong></strong></p>
<div id="attachment_5223" style="width: 455px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5223" class="size-full wp-image-5223" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png" alt="Get External Data - Select your newly created ODBC Data Source (JSON Driver)" width="445" height="395" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1.png 445w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-data-sources-1-300x266.png 300w" sizes="(max-width: 445px) 100vw, 445px" /></a><p id="caption-attachment-5223" class="wp-caption-text">Get External Data &#8211; Select your newly created ODBC Data Source (JSON Driver)</p></div>
<p>&nbsp;</p>
<p>&nbsp;</li>
<li>Select tables from the list of tables in the Import Objects screen and click <strong><strong>OK.<br />
</strong></strong></p>
<div id="attachment_5174" style="width: 473px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5174" class="size-full wp-image-5174" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png" alt="Get External Data - Select tables from Import Objects Screen" width="463" height="452" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables.png 463w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-tables-300x293.png 300w" sizes="(max-width: 463px) 100vw, 463px" /></a><p id="caption-attachment-5174" class="wp-caption-text">Get External Data &#8211; Select tables from Import Objects Screen</p></div></li>
<li>Select <strong>Save Import Steps</strong> from the screen and click on <strong>Save Import</strong> button.
<div id="attachment_5175" style="width: 746px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5175" class="size-full wp-image-5175" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png" alt="Get External Data - Select Save Import Steps" width="736" height="576" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps.png 736w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-select-save-steps-300x235.png 300w" sizes="(max-width: 736px) 100vw, 736px" /></a><p id="caption-attachment-5175" class="wp-caption-text">Get External Data &#8211; Select Save Import Steps</p></div></li>
<li>If everything is OK, you will be able to see the data.
<div id="attachment_5176" style="width: 1353px" class="wp-caption aligncenter"><a href="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-5176" class="size-full wp-image-5176" src="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png" alt="Data Imported Successfully in MS Access DB Table" width="1343" height="404" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported.png 1343w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-300x90.png 300w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-768x231.png 768w, https://zappysys.com/blog/wp-content/uploads/2018/10/ms-access-get-external-data-imported-1024x308.png 1024w" sizes="(max-width: 1343px) 100vw, 1343px" /></a><p id="caption-attachment-5176" class="wp-caption-text">Data Imported Successfully in MS Access DB Table</p></div></li>
</ol>
<h2><span id="How_to_import_REST_API_data_to_Excel">How to <i><u>link</u> </i>REST API data to Access</span></h2>
<p>The linking process is very similar to importing data into the Access table. Follow steps of the previous paragraph &#8211; <a href="#how-to-import-data">How to import REST API data to Access</a> &#8211; but on step 2 select the second option to create a <em><strong>linked table</strong></em><b><i> </i></b>instead. Then once asked to select a unique record identifier, don&#8217;t select anything:</p>
<div id="attachment_7445" style="width: 326px" class="wp-caption alignnone"><img loading="lazy" decoding="async" aria-describedby="caption-attachment-7445" class="wp-image-7445 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png" alt="Link table approach - don't select unique record identifier" width="316" height="382" srcset="https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack.png 316w, https://zappysys.com/blog/wp-content/uploads/2018/10/link-rest-api-data-to-access-table-using-zappysys-odbc-powerpack-248x300.png 248w" sizes="(max-width: 316px) 100vw, 316px" /><p id="caption-attachment-7445" class="wp-caption-text">Linked table approach &#8211; Don&#8217;t select a unique record identifier</p></div>
<h2>REST API / XML SOAP Pagination Settings for MS Access</h2>
<div class="content_block" id="custom_post_widget-3892"><div style="margin-bottom: 1em;">Even we set up ODBC Data Source to get the data, it may not be enough. Usually, if you are getting a huge data set from API provider, it won't give it to you in one HTTP response. Instead, it gives back only a subset of data and provides a mechanism for data pagination. The good news is that <em>ZappySys ODBC Driver</em> includes many options to cover virtually any pagination method.</div>
<div><span style="font-size: 16px;">Below you will find a few examples of API pagination. If you need something more sophisticated check the below link (the article was written for SSIS PowerPack but UI options and concepts apply to ODBC Driver too):</span></div>
<div style="margin-bottom: 1em;"><a href="https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/" target="_blank" rel="noopener">https://zappysys.com/blog/ssis-rest-api-looping-until-no-more-pages-found/</a></div>
<h3>Paginate by Response Attribute</h3>
This example shows how to paginate API calls where you need to paginate until the last page detected. In this example, next page is indicated by some attribute called nextlink (found in response). If this attribute is missing or null then it stops fetching the next page.
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH(
SRC=@'https://zappysys.com/downloads/files/test/pagination_nextlink_inarray_1.json'
,NextUrlAttributeOrExpr = '$.nextlink'  --keep reading until this attribute is missing. If attribute name contains dot then use brackets like this $.['my.attr.name']
)</pre>
<h3>Paginate by URL Parameter (Loop until certain StatusCode)</h3>
This example shows how to paginate API calls where you need to pass page number via URL. The driver keeps incrementing page number and calls next URL until the last page detected (401 error). There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/page-xml.aspx?page=1&amp;mode=DetectBasedOnResponseStatusCode'
,PagingMode='ByUrlParameter'
,PagingByUrlAttributeName='page'
,PagingByUrlEndStrategy='DetectBasedOnResponseStatusCode'
,PagingByUrlCheckResponseStatusCode=401
,IncrementBy=1
)</pre>
<h3>Paginate by URL Path (Loop until no record)</h3>
This example shows how to paginate API calls where you need to pass page number via URL Path. The driver keeps incrementing page number and calls next URL until the last page is detected. There are few ways to indicate the last page (e.g. By status code, By row count, By response size). If you don't specify end detection then it will use the default (i.e. No records found).
<pre class="lang:tsql decode:true codeblock">SELECT * FROM $
WITH (
SRC=@'https://zappysys.com/downloads/files/test/cust-&lt;%page%&gt;.xml'
,PagingMode='ByUrlPath'
,PagingByUrlAttributeName='&lt;%page%&gt;'
,PagingByUrlEndStrategy='DetectBasedOnRecordCount'
,IncrementBy=1
)</pre>
<h3>Paginate by Header Link (RFC 5988)</h3>
API like GitHub / Wordpress use Next link in Headers (<a href="https://tools.ietf.org/html/rfc5988" target="_blank" rel="noopener">RFC 5988</a>)
<pre class="lang:default decode:true ">SELECT * FROM $
LIMIT 25
WITH(
	 Src='https://wordpress.org/news/wp-json/wp/v2/categories?per_page=10'
	,PagingMode='ByResponseHeaderRfc5988'
	,WaitTimeMs='200' --//wait 200 ms after each request
)</pre>
&nbsp;</div>
<h2>REST API / SOAP Web Service Connection Settings for MS Access</h2>
<div class="content_block" id="custom_post_widget-3896"><div style="margin-bottom: 1em;">If you need to authenticate or authorize your user to access a web resource, you will need to use one of the <em>Connections:</em></div>
<ul>
 	<li>HTTP</li>
 	<li>OAuth</li>
</ul>
<img loading="lazy" decoding="async" class="wp-image-4078 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png" alt="ZappySys XML Driver - HTTP and OAuth Connection Types" width="577" height="302" srcset="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252.png 577w, https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-powerpack-authentication-authorization-e1529337108252-300x157.png 300w" sizes="(max-width: 577px) 100vw, 577px" />
<h3>HTTP Connection</h3>
<div style="margin-bottom: 1em;">Use <em>HTTP Connection</em> for simple Windows, Basic, NTLM or Kerberos authentication. Just fill in a username and a password and you are good to go!</div>
<div style="margin-bottom: 1em;">You can also use <em>HTTP Connection</em> for more sophisticated authentication like:</div>
<ul>
 	<li><strong>SOAP WSS</strong> (when accessing a SOAP WebService)</li>
 	<li><strong>Static Token / API Key</strong> (when need to pass an API key in HTTP header)</li>
 	<li><strong>Dynamic Token</strong> (same as Static Token method except that each time you need to log in and retrieve a fresh API key)</li>
 	<li><strong>JWT Token</strong> (As per RFC 7519)</li>
</ul>
<img loading="lazy" decoding="async" class="alignnone wp-image-4091 size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-1.png" alt="" width="622" height="570" />
<h3>OAuth</h3>
If you are trying to access REST API resource, it is a huge chance, you will need to use <em>OAuth Connection</em>. <a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">Read this article</a> to understand how OAuth authentication and authorization works and how to use it (article originally was written for <a href="https://zappysys.com/products/ssis-powerpack/" target="_blank" rel="noopener">SSIS PowerPack</a>, but the concepts and UI stay the same): <br/>
<a href="https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/" target="_blank" rel="noopener">https://zappysys.com/blog/rest-api-authentication-with-oauth-2-0-using-ssis/</a>
<img loading="lazy" decoding="async" class="alignnone size-full" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-api-connection-type-2.png" width="721" height="708" /></div>
<h2>Other settings for REST API / SOAP XML Call in MS Access</h2>
<div class="content_block" id="custom_post_widget-3901">There are few settings you can coder while calling Web API
<h3><strong>API Limit / Throttling</strong></h3>
While calling public API or other external web services one important aspect you have to check,  how many requests are allowed by your API. Especially when you use API pagination options to pull many records you have to slow down based on API limits. For example, your API may allow you only 5 requests per second. Use Throttling Tab on Driver UI to set delay after each request.
<h3><strong>2D Array Transformation</strong></h3>
If you are using JSON or XML API Driver then possible you may have to transform your data using 2D array transformation feature. <a href="https://zappysys.com/blog/parse-multi-dimensional-json-array-ssis/" target="_blank" rel="noopener">Check this link</a> for more information.

&nbsp;</div>
<h2>REST API / XML SOAP Performance Tips for MS Access</h2>
<div class="content_block" id="custom_post_widget-4455">While calling APIs you may face some performance issues. There are a few tips you can consider to speed up things.
<h4><span style="font-size: 14pt;"><strong>Use Server-side filtering if possible in URL or Body Parameters</strong></span></h4>
Many API supports filtering your data by URL parameters or via Body. Whenever possible try to use such features.  Here is an example of <a href="http://www.odata.org/getting-started/basic-tutorial/" target="_blank" rel="noopener">odata API</a>, In the below query the first query is faster than the second query because in the first query we filter at the server.
<pre class="lang:tsql decode:true">SELECT * FROM value
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json&amp;$filter=Country eq ''USA'''
	,DataFormat='Odata'
)

-- Slow query - Client-side filtering
SELECT * FROM value
WHERE Country ='USA'
WITH(
	 Src='https://services.odata.org/V3/Northwind/Northwind.svc/Customers?$format=json'
	,DataFormat='Odata'
)</pre>
<h4><span style="font-size: 14pt;"><strong>Avoid Special features in SQL Query (e.g. WHERE, Group By, Order By)</strong></span></h4>
ZappySys API engine triggers client-side processing if special features are used in Query. Following SQL Features will trigger Client-Side processing which is several times slower than server-side processing. So always try to use simple query (Select col1, col2 .... from mytable )
<ul>
 	<li>WHERE Clause</li>
 	<li>GROUP BY Clause</li>
 	<li>HAVING Clause</li>
 	<li>ORDER BY</li>
 	<li>FUNCTIONS (e.g. Math, String, DateTime, Regex... )</li>
</ul>
LIMIT clause does not trigger client-side processing.
<h4><span style="font-size: 14pt;"><strong>Consider using pre-generated Metadata / Cache File</strong></span></h4>
Use META option in WITH Clause to use static metadata (Pre-Generated)There are two more options to speedup query processing time. Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details.
<ol>
 	<li>
<pre class="lang:default decode:true">select * from value WITH( meta='c:\temp\meta.txt' )
--OR--
select * from value WITH( meta='my-meta-name' )
--OR--
select * from value WITH( meta='[ {"Name": "col1",&amp;nbsp;"Type": "String", Length: 100},&amp;nbsp;{"Name": "col2",&amp;nbsp;"Type": "Int32"} ...... ]' )</pre>
</li>
 	<li>Enable Data Caching Options (Found on <strong>Property Grid</strong> &gt; <strong>Advanced</strong> Mode Only )</li>
</ol>
<h4><span style="font-size: 14pt;"><strong>Consider using Metadata / Data Caching Option</strong></span></h4>
ZappySys API drivers support Caching Metadata and Data rows to speed up query processing. If your data doesn't change often then you can enable this option to speed up processing significantly.

Check <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/" target="_blank" rel="noopener">this article</a> for details how to enable Data cache / metadata cache feature for datasource level or query level.

To define cache option at query level you can use like below.
<pre class="">SELECT * FROM $
WITH 
(  SRC='https://myhost.com/some-api'
  ,CachingMode='All'  --cache metadata and data rows both
  ,CacheStorage='File' --or Memory
  ,CacheFileLocation='c:\temp\myquery.cache'
  ,CacheEntryTtl=300 --cache for 300 seconds
)
</pre>
&nbsp;

&nbsp;
<h4><strong><span style="font-size: 14pt;">Use --FAST Option to enable Stream Mode</span></strong></h4>
ZappySys JSON / XML drivers support <strong>--FAST</strong> suffix for Filter. By using this suffix after Filter driver enables Stream Mode, <a href="https://zappysys.com/blog/caching-metadata-odbc-drivers-performance/#Reading_Large_Files_Streaming_Mode_for_XML_JSON" target="_blank" rel="noopener">Read this article</a> to understand how this works.
<pre class="lang:default decode:true">SELECT * FROM $ 
LIMIT 10 --//add this just to test how fast you can get 10 rows
WITH(
  Filter='$.LargeArray[*]--FAST' --//Adding --FAST option turn on STREAM mode (large files)
 ,SRC='https://zappysys.com/downloads/files/test/large_file_100k_largearray_prop.json.gz'
 --,SRC='c:\data\large_file.json.gz'
 ,IncludeParentColumns='False'  --//This Must be OFF for STREAM mode (read very large files)
 ,FileCompressionType='GZip' --Zip or None (Zip format only available for Local files)
)</pre>
&nbsp;</div>
<h2>Calling SOAP Web Service in MS Access</h2>
<div class="content_block" id="custom_post_widget-3870">To call SOAP API you need to know Request XML Body Structure. If you are not sure how to create SOAP Request body then no worries. <a href="https://zappysys.com/blog/calling-soap-web-service-in-ssis-xml-source/" target="_blank" rel="noopener">Check this article</a> to learn how to generate SOAP Request body using the Free tool <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI</a>. Basically, you have to use SoapUI to generate Request XML and after that, you can replace parameters as needed in the generated body.
<h3>What is SOAP Web Service?</h3>
If you are new to SOAP Web Service sometimes referred as XML Web Service then please read some concept about SOAP Web service standard <a href="https://msdn.microsoft.com/en-us/library/ms996507.aspx?f=255&amp;MSPPError=-2147217396" target="_blank" rel="noopener">from this link</a>

There are two important aspects in SOAP Web service.
<ol>
 	<li>Getting WSDL file or URL</li>
 	<li>Knowing exact Web Service URL</li>
</ol>
<h3>What is WSDL</h3>
In very simple term WSDL (often pronounced as whiz-dull) is nothing but a document which describes Service metadata (e.g. Functions you can call, Request parameters, response structure etc). Some service simply give you WSDL as xml file you can download on local machine and then analyze or sometimes you may get direct URL (e.g. http://api.mycompany.com/hr-soap-service/?wsdl )
<h3>Example SQL Query for SOAP API call using ZappySys XML Driver</h3>
Here is an example SQL query you can write to call SOAP API. If you not sure about many details then check next few sections on how to use XML Driver User Interface to build desired SQL query to POST data to XML SOAP Web Service without any coding.
<pre class="lang:tsql decode:true">SELECT * FROM $
WITH(
	 Src='http://www.holidaywebservice.com/HolidayService_v2/HolidayService2.asmx'
	,DataConnectionType='HTTP'
	,CredentialType='Basic' --OR SoapWss
	,SoapWssPasswordType='PasswordText'
	,UserName='myuser'
	,Password='pass$$w123'
	,Filter='$.soap:Envelope.soap:Body.GetHolidaysAvailableResponse.GetHolidaysAvailableResult.HolidayCode[*]'
	,ElementsToTreatAsArray='HolidayCode'	
	,RequestMethod='POST'	
	,Header='Content-Type: text/xml;charset=UTF-8 || SOAPAction: "http://www.holidaywebservice.com/HolidayService_v2/GetHolidaysAvailable"'
	,RequestData='
&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:hol="http://www.holidaywebservice.com/HolidayService_v2/"&gt;
   &lt;soapenv:Header/&gt;
   &lt;soapenv:Body&gt;
      &lt;hol:GetHolidaysAvailable&gt;
         &lt;!--type: Country - enumeration: [Canada,GreatBritain,IrelandNorthern,IrelandRepublicOf,Scotland,UnitedStates]--&gt;
         &lt;hol:countryCode&gt;UnitedStates&lt;/hol:countryCode&gt;
      &lt;/hol:GetHolidaysAvailable&gt;
   &lt;/soapenv:Body&gt;
&lt;/soapenv:Envelope&gt;'
)</pre>
Now let's look at steps to create SQL query to call SOAP API. Later we will see how to generate code for your desired programming language (e.g. C# or SQL Server)
<h3>Video Tutorial - Introduction to SOAP Web Service and SoapUI tool</h3>
Before we dive into details about calling SOAP API using ZappySys XML Driver, lets first understand what is SOAP API and how to create SOAP requests using SoapUI tool. You will learn more about this process in the later section. The video contains some fragment about using SOAP API in SSIS but just ignore that part because we will be calling Soap API using ZappySys ODBC Driver rather than SSIS Components.

&nbsp;

<iframe loading="lazy" width="560" height="315" src="https://www.youtube.com/embed/d_x5bgGjg0Y?rel=0&amp;showinfo=0" frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="allowfullscreen" data-mce-fragment="1"></iframe>
<h3>Using SoapUI to test SOAP API call / Create Request Body XML</h3>
Assuming you have downloaded and installed <a href="https://www.soapui.org/downloads/latest-release.html" target="_blank" rel="noopener">SoapUI from here</a>, now we are ready to use WSDL for your SOAP Web Service Calls. If you do not have WSDL file or URL handy then contact your API provider (sometimes you just have to add <strong>?wsdl </strong>at the end of your Service URL to get WSDL so try that. Example: http://mycompany/myservice?wsdl ).

If you don't know what is WSDL then in short, WSDL is <strong>Web service Description Language</strong> (i.e. XML file which describes your SOAP Service). WSDL helps to craft SOAP API request Body for ZappySys XML Driver. So Let's get started.
<ol>
 	<li>Open SoapUI and click SOAP button to create new SOAP Project</li>
 	<li>Enter WSDL URL or File Path of WSDLFor example WSDL for our sample service can be accessed via this URL
<pre class="lang:default highlight:0 decode:true">http://www.dneonline.com/calculator.asmx?wsdl</pre>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-import-wsdl-new-soapui-project.png"><img loading="lazy" decoding="async" class="size-full wp-image-3871" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-14.png" alt="Create new SOAP API Project in SoapUI tool for SOAP API Testing" width="486" height="349" /></a>
<div style="margin-bottom: 1em;">Create new SOAP API Project in SoapUI tool for SOAP API Testing</div></li>
 	<li>Once WSDL is loaded you will see possible operations you can call for your SOAP Web Service.</li>
 	<li>If your web service requires credentials then you have to configure it. There are two common credential types for public services (<strong>SOAP WSS</strong> or <strong>BASIC</strong> )
<ol>
 	<li>
<div style="margin-bottom: 1em;">To use <strong>SOAP WSS Credentials</strong> select request node and enter UserId, Password, and <strong>WSS-PasswordType</strong> (PasswordText or PasswordHash)</div>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-soap-wss-credentials-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3872 alignnone" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)" width="294" height="544" /></a>
<div style="display: block;">Configure SOAP WSS Credentials for SoapUI (SOAP API Testing Tool)</div></li>
 	<li>To use <strong>BASIC Auth</strong> Credentials select request node and double-click it. At the bottom click on Auth (Basic) and From Authorization dropdown click Add New and Select Basic.<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-api-pass-basic-authentication-userid-password.png"><img loading="lazy" decoding="async" class="size-full wp-image-3873" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-2.png" alt="Configure Basic Authorization for SoapUI (SOAP API Testing Tool)" width="616" height="653" /></a>
<div style="margin-bottom: 1em;">Configure Basic Authorization for SoapUI (SOAP API Testing Tool)</div></li>
</ol>
</li>
 	<li>Now you can test your request first Double-click on the request node to open request editor.</li>
 	<li>Change necessary parameters, remove optional or unwanted parameters. If you want to regenerate request you can click on <strong>Recreate default request toolbar icon</strong>.
<a href="https://zappysys.com/blog/wp-content/uploads/2016/06/create-soap-request-with-optional-parameters-soapui.png"><img loading="lazy" decoding="async" class="size-full wp-image-2812" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-4.png" alt="Create SOAP Request XML (With Optional Parameters)" width="807" height="315" /></a>
<div style="margin-bottom: 1em;">Create SOAP Request XML (With Optional Parameters)</div></li>
 	<li>Once your SOAP Request XML is ready, <strong>Click the Play button</strong> in the toolbar to execute SOAP API Request and Response will appear in Right side panel.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soapui-test-soap-api-request-response-edit-xml-body.png"><img loading="lazy" decoding="async" class="size-full wp-image-3874" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-5.png" alt="Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)" width="1216" height="511" /></a>
Test SOAP API using SoapUI Tool (Change Default XML Body / Parameters, Execute and See Response)</li>
</ol>
<h3>Create DSN using ZappySys XML Driver to call SOAP API</h3>
Once you have tested your SOAP API in SoapUI tool, we are ready to use ZappySys XML driver to call SOAP API in your preferred BI tool or Programming language.
<ol>
 	<li>First open <strong>ODBC Data Sources</strong> (search ODBC in your start menu or go under ZappySys &gt; ODBC PowerPack &gt; <strong>ODBC 64 bit</strong>)</li>
 	<li>Goto <strong>System DSN</strong> Tab (or User DSN which is not used by Service account)</li>
 	<li>Click <strong>Add</strong> and Select ZappySys XML Driver
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-odbc-xml-soap-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3875" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-6.png" alt="ZappySys ODBC Driver for XML / SOAP API" width="593" height="459" /></a>
ZappySys ODBC Driver for XML / SOAP API</li>
 	<li>Configure API URL, Request Method and Request Body as below
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3876" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-7.png" alt="ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body" width="916" height="874" /></a>
ZappySys XML Driver - Calling SOAP API - Configure URL, Method, Body</li>
 	<li><strong>(This step is Optional)</strong> If your SOAP API requires credentials then Select Connection Type to HTTP and configure as below.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-call-credential-basic-soap-wss-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3877" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-8.png" alt="ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)" width="564" height="483" /></a>
<div style="display: block;">ZappySys XML Driver - Configure SOAP WSS Credentials or Basic Authorization (Userid, Password)</div></li>
 	<li>Configure-Request Headers as below (You can get it from Request &gt; Raw tab from SoapUI after you test the request by clicking the Play button)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/set-soap-api-request-headers-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3881" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-9.png" alt="Configure SOAP API Request Headers - ZappySys XML Driver" width="1009" height="747" /></a>
Configure SOAP API Request Headers - ZappySys XML Driver</li>
 	<li>Once credentials entered you can select Filter to extract data from the desired node. Make sure to select array node (see special icon) or select the node which contains all necessary columns if you don't have array node.
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/soap-api-query-select-filter-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3882" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-10.png" alt="Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)" width="809" height="594" /></a>
Select Filter - Extract data from nested XML / SOAP API Response (Denormalize Hierarchy)</li>
 	<li>If prompted select yes to treat selected node as Array (This is helpful when you expect one or more record for selected node)
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/xml-api-array-handling-zappysys-xml-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3883" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-11.png" alt="Treat selected node as XML Array Option for SOAP API Response XML" width="655" height="572" /></a>
Treat selected node as XML Array Option for SOAP API Response XML</li>
</ol>
<h3>Preview SOAP API Response / Generate SQL Code for SOAP API Call</h3>
Once you configure settings for XML Driver now you can preview data or generate example code for desired language (e.g. C#, Python, Java, SQL Server).

Go to Preview tab and you will see default query generated based on settings you entered in previous sections. Attributes listed in WITH clause are optional. If you omit attribute in WITH clause it will use it from Properties tab.
<h3>Preview Data</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/calling-soap-web-service-zappysys-xml-api-driver.png"><img loading="lazy" decoding="async" class="size-full wp-image-3884" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-12.png" alt="Preview SOAP API Response in ZappySys XML Driver" width="808" height="780" /></a>
Preview SOAP API Response in ZappySys XML Driver
<h3>Generate Code Option</h3>
<a href="https://zappysys.com/blog/wp-content/uploads/2018/06/zappysys-driver-code-generator.png"><img loading="lazy" decoding="async" class="size-full wp-image-3885" src="https://zappysys.com/blog/wp-content/uploads/2018/06/odbc-call-soap-api-13.png" alt="Generate Example Code for ZappySys Driver" width="572" height="618" /></a>
<div style="display: block;">Generate Example Code for ZappySys Driver</div></div>
<div class="content_block" id="custom_post_widget-8935"><h2>Troubleshooting Errors</h2>
<p>While running in Access\Excel\other and reading data from DSN created with ODBC PowerPack, if you get this error "<strong>License type [ODBC_PP_TRIAL] not found or its expired</strong>"</p>

<p>Please refer to this article for the same:  <a href="https://zappysys.zendesk.com/hc/en-us/articles/360042521533-Troubleshooting-License-type-ODBC-PP-TRIAL-not-found-or-its-expired-error-in-Microsoft-Access" target="_blank" rel="noopener">Troubleshooting "License type [ODBC_PP_TRIAL] not found or its expired" error in Microsoft Access</a></p></div>
<h2><span id="Conclusion">Conclusion</span></h2>
<p>In this article, we learned how to use the <a href="https://zappysys.com/products/odbc-powerpack/">ZappySys ODBC PowerPack</a> to import JSON to Access. We used the OData protocol for Import data to Access.  With ZappySys ODBC Power Pack, you can query REST API information or JSON files using SQL and filter the information or write custom queries according to your needs.</p>
<h2><span id="References">References</span></h2>
<ul>
<li><a href="https://www.w3schools.com/js/js_json_intro.asp">JSON – Introduction</a></li>
<li><a href="http://www.restapitutorial.com/">Learn REST: A RESTful Tutorial</a></li>
</ul>
<p>The post <a href="https://zappysys.com/blog/import-rest-api-ms-access-load-json-soap-xml/">Import REST API in MS Access (Load JSON / SOAP XML)</a> appeared first on <a href="https://zappysys.com/blog">ZappySys Blog</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
