SAP Knowledge Base Article - Public

1201695 - Error: "Failed to retrieve data from the database", followed by "Database Connector Error: Cannot obtain error message from server"

Symptom

When attempting to report off a Stored Procedure, the following error messages appear:
 
"Failed to retrieve data from the database" followed by "Database Connector Error: Cannot obtain error message from server".

Cause

The Stored Procedure being used was created using the Dynamic SQL method.
Dynamic SQL is an enhanced form of Structured Query Language (SQL) that, unlike standard (or static) SQL, facilitates the automatic generation and execution of program statements.
Dynamic SQL does not allow the use of Strongly Bound Ref Cursors.

Resolution

To work around this behavior, perform one of the workarounds offered below:

 

  1. Use Static SQL, in which we can have a Strongly Bound Ref Cursor e.g %ROWTYPE.

    -Or-
  2. Use a native Oracle driver instead of an ODBC connection.

Keywords

Failed to retrieve data from the database, Database Connector Error, Cannot obtain error message from server, Dynamic SQL , 5721368 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Bug Filed

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2