cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

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?

Accepted Solutions (0)

Answers (3)

Answers (3)

DellSC
Active Contributor
0 Kudos

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

former_member292966
Active Contributor
0 Kudos

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

0 Kudos

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/crysta...

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

Don