Skip to Content
avatar image
Former Member

Failed to retrieve data from the database.DB Vendor Code 156

I have looked under every posting with the same title and have not found a solution. I have been referred here by SAP "Support" (not much of a support I might add) to find a resolution.

I have installed Crystal 2016 but for some reason I can't run reports with SQL in them. I get the above error everytime. When I take the SQL out then the report runs fine. I have verified the connections are good with our DBA.

What am I doing wrong?

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 02, 2016 at 09:37 PM

    Hi Teresa,

    Try this archived SCN post:

    https://archive.sap.com/discussions/thread/1811789

    As noted that error code is being passed to you from the DB/Client, CR is simply passing the error code along.

    Check with your DBA on what that error means.

    This may help also:

    https://social.msdn.microsoft.com/Forums/sqlserver/en-US/f4c56a43-0d29-44cd-aef3-7f75bc88c506/crystal-reports-for-add-command-and-get-error?forum=sqlserversamples

    If you are using ODBC then check on the option for case sensitivity and in CR Designer as well:

    Don

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 04:12 PM

    Hi Teresa,

    It sounds like you've already gone through the process already but can you give me a few more details?

    What database are you using?

    How are you connecting to it? ODBC or direct?

    You mentioned if you take the SQL out, the report works. Does this mean you created a SQL Command and are linking it to a table?

    Thanks,

    Brian

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2016 at 06:22 PM

    By "SQL" I'm going to assume that you're trying to use a Command in the report in addition to the tables. Is that correct?

    Did you create the command using Crystal syntax or the syntax for the database you're connecting to? You MUST use the syntax from the database and you cannot use any Crystal-specific functions or formulas.

    See my blog post for more information about using Commands: https://blogs.sap.com/2015/04/01/best-practices-when-using-commands-with-crystal-reports/

    -Dell

    Add comment
    10|10000 characters needed characters exceeded