Double error: Export failed and Failed to retrieve data from the database

ISoft (7 posts)
October 13, 2021 01:38 PM
Accepted Answer

I'm curious about the following couple of error message lines and differentiating between situations where it's an actual error with a .rpt file or if it's a mysql or ODBC connection issue.

Here's the relevant log lines from the rc log

2021-10-13 15:09:54 Error Export failed: Error in File Pick List (Delivery) 3376_4504_{E310BF0B-F16F-4130-99AB-7A9F1CD48B88}.rpt:
Failed to retrieve data from the database.
Details:  [Database Vendor Code: 1142 ]: Error in File Pick List (Delivery) 3376_4504_{E310BF0B-F16F-4130-99AB-7A9F1CD48B88}.rpt:
Failed to retrieve data from the database.
Details:  [Database Vendor Code: 1142 ]

2021-10-13 15:09:54 Info Sending e-mail for task Send e-mail with subject "Pick List (Delivery)"

 

Some background, they have a working version of our python script that downloads a .rpt file, generates a command line and calls adcrutil.exe (RC version 2.3)

They installed our script and Report Commander (2.6) on a new AWS server and created an appropriate and working ODBC connection (tests fine in the odbcad32.exe gui) but when we run the report either through our script or through the Command Line builder, we get the above error.  

Is there a way to know if this is some sort of misconfiguration with an ODBC setup, is there a problem with the .rpt (though we've tried several), or both?

 

 

Bill Staff (603 posts)
October 13, 2021 02:43 PM
Accepted Answer

Often it's hard to tell. The error messages come from the Crystal Reports runtime (provided by SAP and not under our control) and are often vague or misleading.

In this case the Database Vendor Code provides useful information--that will always be an error code specific to the database engine you're connecting to and they're usually pretty specific. MySQL error 1142 is a permission error, though unfortunately the error message doesn't tell us which permission is lacking. It's possible you're connecting using a login that has permission to log in (so the test in ODBC control panel works) but that doesn't have permission to select data.

ISoft (7 posts)
October 14, 2021 09:44 AM
Accepted Answer

That's fair, and kind of what I was expecting.  Sometimes folks see the 'export failed' message before the logon or connection-related ones and assume it's a script problem, I just wanted to confirm.  

 

I will see about creating a test script to test odbc connections and perhaps user privileges.

Replies are disabled for this topic.