sql server - How to execute stored procedure without exception thrown by CRecordset::Open? -


I am trying to execute a stored procedure on a SQL server from an MFC-based C ++ program. The stored procedure is executed properly, but an exception is placed in a CDBException containing messages of "function sequence error" in my program. Tracing through the MFC source code for CRCreset :: Open, the exception has been removed from the Move Next - it makes sense, because my stored procedure is not generating any output.

I have input and output parameters both stored procedure, so I can not use the recommended CDB: :: Execute SQL in this question:

I finally came up with a hack to fix the problem, I could not wait for SO to give an answer I already got the problem to CRecordSet :: was found in MoveNext, which immediately calls the CRCrescate :: MOVE. Which I have not realized immediately that Move has been declared virtual, so it is possible to bypass it with its own version.

  Zero CMIRCorcaseet :: Move (long nRows, WORD wFetchType) {(zero) NRO; (Zero) wFetchType; M_bEOF = True; }  

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -