title: How to correctly execute a query that contains a procedure and has no return in Objectscript/Intersystems IRIS
body: <p>I am trying to execute a stored procedure from my Operation, the way I have the most satisfatory result was by the following call:</p>
  <pre><code>Set tResult = ##Class(EnsLib.SQL.GatewayResultSet).%New()
  Set tQuery = &quot;EXEC MY_PROC @name = 'Jhon', @profession = 'carpenter'&quot;
  Set tSC = ..Adapter.ExecuteQuery(.tResult, tQuery)
  </code></pre>
  <p>The procedure is executed, (it removes a registry from an ODSE database and has no return by default) but I get an error like</p>
  <p>&quot;Error #5023 Remote Gateway Error. The statement did not return a resultset.&quot;</p>
  <p>And my operation stops.</p>
  <p>I even tried the method ExecuteProcedure without success.</p>
  <p>Can anyone help me on that :)</p>
  <p>Ps. I'm new on this stack, and a junior at all. D:</p>
  <p>Thanks in advance.</p>