title: How to check whether stored procedure executed successfully
body: <p>If you have a stored procedure that executing multiple queries, doesn't return values and doesn't have error-handling in it, how can you ascertain whether the stored procedure ended successfully when calling from VB code?</p>
  
  <p>For example, if the stored procedure is something like:</p>
  
  <pre><code>create stored procedure some_procedure
      Insert  into ...
      delete ...
      update ... 
  end
  </code></pre>
  
  <p>... and the VB code is like this:    </p>
  
  <pre><code>Cmd.ActiveConnection = cn
  Cmd.CommandText = "some_procedure"
  Cmd.CommandType = adCmdStoredProc
  Set rs = Cmd.Execute
  Debug.Print rs(0)
  </code></pre>
  
  <p>... then how can I get a return value that is <code>0</code> for success or <code>1</code> for failure?</p>