Article ID: 241639 - Last Review: May 12, 2003 - Revision: 2.1 PRB: "Errors Occurred" Error When Calling Stored Procedure with More than a SELECT StatementThis article was previously published under Q241639 On This PageSYMPTOMS
When calling ICommand::Execute to execute a Microsoft SQL Server stored procedure using the Microsoft SQL Server OLE DB Provider, DB_E_ERRORSOCCURRED is returned and the IErrorInfo description information states "Errors Occurred."
CAUSE
The stored procedure contains more than a simple SELECT statement. A client side cursor is required.
RESOLUTION
In order to resolve this, you will have to use client side cursors. There are two ways to use client side cursors:
STATUS
This behavior is by design (although Microsoft is investigating whether a more informative error message can be returned).
MORE INFORMATION
Here is an example of what the stored procedure might look like:
Steps to Reproduce BehaviorTo reproduce the error, create this sample stored procedure and then execute the following code:REFERENCES
See the SQL Server Books Online topic "Rowsets and SQL Server Cursors" for more information.
| Article Translations
|

Back to the top
