title: How to execute stored procedure without exception thrown by CRecordset::Open?
body: <p>I'm trying to execute a stored procedure on SQL Server from an MFC based C++ program.  The stored procedure does get executed properly, but an exception is thrown in my program, a CDBException with a message of "Function sequence error".  Tracing through the MFC source code for CRecordset::Open, the exception is thrown from MoveNext - this makes sense, as my stored procedure isn't generating any output.</p>
  
  <p>I have both input and output parameters to the stored procedure, so I can't use CDatabase::ExecuteSQL as suggested in this question:
  <a href="https://stackoverflow.com/questions/839739/with-cdatabase-can-i-send-sql-without-using-crecordset">With CDatabase, can I send SQL without using CRecordSet?</a></p>