Database Vendor code: 229 – Crystal Report

If you get the below error in Crystal Report

Failed to retrieve data from the database. Details: [Database Vendor Code: 229]

This mean you do not have access to the data. This possibly occurred because you created your report on one machine and then deployed it on another. On deployment, you noticed that your report does not pull that data instead you get this error. The most likely cause is the permission. You do not have permission to query that data or run stored procedures or function.

Possible Causes

  • Your report uses functions calls or store procedure, your login is not allowed to run function and stored procedures
  • Your login does not have select permission for the database/table
  • Other permission related problem

Solution

By allowing read or execute permission will fix the problem. If it is just one one function call /store procedure that is causing the problem, the following command will be helpful

GRANT EXECUTE ON dbo.my_function TO [user/role]

This entry was posted in Troubeleshoot. Bookmark the permalink.

4 Responses to Database Vendor code: 229 – Crystal Report

  1. Syilvia says:

    Thank you for this information, I can solve my client problem. I have read many pages of related post but yours is the best, you can explain how – rootcause – and solution also.
    Once again thank you.

    • admin says:

      Sylivia, Basically you are able to connect to the database but you do not have permission to execute the store procedures or select statement. That is the root cause of the problem. The solution is give that that user execute permission on that particular select statement.

      It is typical if you are working on two different boxes. One box has correct permission, the other does not.

      Thanks

  2. erwin says:

    thanks

  3. Stefan says:

    one of my Clients is getting the same error ,
    but he can view the report , the error only pops up when trying to print or export the report to PDF of Excel .

    I have checked that he has execute permissions in SQL for the SP

Leave a comment