<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Execute a stored procedure from Qlik Sense without loading data in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Execute-a-stored-procedure-from-Qlik-Sense-without-loading-data/m-p/2079561#M88562</link>
    <description>&lt;P&gt;I wrestled with this a bit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever you call a stored procedure, Qlik expects to load data into a Qlik table from that procedure.&amp;nbsp; So have each stored procedure return a table of some kind.&amp;nbsp; If&amp;nbsp; you don't need the returned table, just drop the data on the floor.&lt;/P&gt;
&lt;P&gt;My solution (because I could edit a procedure that did not return a value), was to return a table.&amp;nbsp; Using SQL Server, inside the procedure,&amp;nbsp; 1) I added the declaration of a table, 2) I populated the table, and 3) I returned a value from the table.&amp;nbsp; The text that I added looked something like this:&lt;/P&gt;
&lt;P&gt;Declare @t table(col1 int);&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;insert into @t (col1) Select 1&amp;nbsp; &amp;nbsp;-- This stored a single row into the table, with a value of "1".&lt;/P&gt;
&lt;P&gt;Select * from @t&lt;BR /&gt;&lt;BR /&gt;end&lt;/P&gt;
&lt;P&gt;Then, inside Qlik I loaded the table that was returned by the procedure (a single row with a value of 1) into a Qlik table, and then dropped the Qlik table.&amp;nbsp; The syntax was something like this:&lt;/P&gt;
&lt;P&gt;Load1:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL EXEC ...;&lt;BR /&gt;drop Table Load1;&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2023 19:44:39 GMT</pubDate>
    <dc:creator>SeekTheLight</dc:creator>
    <dc:date>2023-06-02T19:44:39Z</dc:date>
    <item>
      <title>Execute a stored procedure from Qlik Sense without loading data</title>
      <link>https://community.qlik.com/t5/App-Development/Execute-a-stored-procedure-from-Qlik-Sense-without-loading-data/m-p/1733927#M56042</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to execute a stored procedure in Qlik&amp;nbsp;&lt;STRONG&gt;before&amp;nbsp;&lt;/STRONG&gt;I load data from another stored proc. Right now, my load script connects to the database then uses:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;[MyTable]:&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;SQL exec [my stored procedure] 'my parameter 1', 'my parameter 2', 'my parameter 3';&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;I receive the error:&amp;nbsp;&lt;STRONG&gt;Unable to get column information for the fields that are used in the query: Object reference not set to an instance of an object.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I have checked the &lt;SPAN&gt;QvOdbcConnectorPackage.exe.config&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;found in:&amp;nbsp;&lt;/SPAN&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;C:\Program Files\Common Files\Qlik\Custom Data\QvOdbcConnectorPackage&lt;/SPAN&gt;&lt;/FONT&gt; and can confirm that the allow non select queries is set to True.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could someone provide me with a solution for executing this stored proc in Qlik without needing to load data?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 18:15:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Execute-a-stored-procedure-from-Qlik-Sense-without-loading-data/m-p/1733927#M56042</guid>
      <dc:creator>kdaniels-obrien</dc:creator>
      <dc:date>2024-11-16T18:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Execute a stored procedure from Qlik Sense without loading data</title>
      <link>https://community.qlik.com/t5/App-Development/Execute-a-stored-procedure-from-Qlik-Sense-without-loading-data/m-p/2079561#M88562</link>
      <description>&lt;P&gt;I wrestled with this a bit.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Whenever you call a stored procedure, Qlik expects to load data into a Qlik table from that procedure.&amp;nbsp; So have each stored procedure return a table of some kind.&amp;nbsp; If&amp;nbsp; you don't need the returned table, just drop the data on the floor.&lt;/P&gt;
&lt;P&gt;My solution (because I could edit a procedure that did not return a value), was to return a table.&amp;nbsp; Using SQL Server, inside the procedure,&amp;nbsp; 1) I added the declaration of a table, 2) I populated the table, and 3) I returned a value from the table.&amp;nbsp; The text that I added looked something like this:&lt;/P&gt;
&lt;P&gt;Declare @t table(col1 int);&lt;/P&gt;
&lt;P&gt;...&lt;/P&gt;
&lt;P&gt;insert into @t (col1) Select 1&amp;nbsp; &amp;nbsp;-- This stored a single row into the table, with a value of "1".&lt;/P&gt;
&lt;P&gt;Select * from @t&lt;BR /&gt;&lt;BR /&gt;end&lt;/P&gt;
&lt;P&gt;Then, inside Qlik I loaded the table that was returned by the procedure (a single row with a value of 1) into a Qlik table, and then dropped the Qlik table.&amp;nbsp; The syntax was something like this:&lt;/P&gt;
&lt;P&gt;Load1:&lt;BR /&gt;Load *;&lt;BR /&gt;SQL EXEC ...;&lt;BR /&gt;drop Table Load1;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 19:44:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Execute-a-stored-procedure-from-Qlik-Sense-without-loading-data/m-p/2079561#M88562</guid>
      <dc:creator>SeekTheLight</dc:creator>
      <dc:date>2023-06-02T19:44:39Z</dc:date>
    </item>
  </channel>
</rss>

