10.2.300.5 BAQ Designer in 10.2 not providing error details

Is this the future? We upgraded to 10.2 and immediately users are noticing their error messages are incorrect.
I hope it’s a setting somewhere.

Example: Simple BAQ, when I try to analyze I should get an error about a field not being in a group by or aggregate function or something like that.

image

The Error I get is:

Severity: Error, Table: , Field: , RowID: , Text: Bad SQL statement.
Review the server event logs for details.
Query returned 0 row(s).
Query has no more records to return.
Query execution total time: 33.8413 ms.

Whoops … Don’t know what I was thinking in that last post (which I’ve deleted)

When I duplicate your BAQ, I get the expected error of

Severity: Error, Table: , Field: , RowID: , Text: Column ‘Erp.PartPlant.Plant’ is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

For the SQL clause of

select 
	[PartPlant].[Company] as [PartPlant_Company],
	[PartPlant].[Plant] as [PartPlant_Plant]
from Erp.PartPlant as PartPlant
group by [PartPlant].[Company]

I’m on ver 10.1.400.23

Unfortunately @markb_wi I get the same result in 10.2.300.6 :frowning:

The detailed error is in the server event viewer, but not very practical to have to log in to the server to see query errors…

Thanks Calvin yes this is new, it worked fine on 10.1.500.13. I submitted a ticket we’ll see what they say.

Ok, so in 10.2.300.6 when I click on Test I get the same error as @markb_wi, but when I click Analyze it does give me the actual error message. Do you not get the below error @markb_wi when clicking Analyze in your version?

Oh boy did they switch the order of the buttons? Here’s what I’m seeing in 10.2:
image

It looks like they didn’t re-order the buttons but the test button used to return the same information the analyze button did. Not a huge deal but I was pretty surprised. Thanks for the help!

In 10.1.400.23 …

  • Buttons are:
    image

  • Analyze results:
    Column 'Erp.PartPlant.Plant' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

  • Test results:
    Severity: Error, Table: , Field: , RowID: , Text: Column 'Erp.PartPlant.Plant' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.
    Query returned 0 row(s).
    Query has no more records to return.
    Query execution total time: 13.4291 ms.

Something changed in 10.2 I guess where you need to click Analyze to see the actual error now.

1 Like

10.2.300 includes several Security “Hardening” updates. One of those is that Epicor will no longer return an error generated by SQL back to the end user. The user will get a generic error message while the actual error message is logged.

While this may not be convenient for you power users, it is in line with security “best practices” and as you have found, the information is available via the BAQ Designer.

1 Like

So this only affects the error message displayed when trying to execute the BAQ call via the Test button, correct?

The Analyze button will do a check of the query, w/o communication with the DB?

Test Button runs the standard Execute BAQ logic so is subject to the generic error message replacement logic.

Analyze button does pass the query to SQL for Syntax and Analysis so any error message returned should be what is logged via the Execute path.

What if I’m getting
“Syntax is OK”
when I click Analyze… and
“Severity: Error, Text: Bad SQL statement.
Review the server event logs for details.
Query returned 0 row(s).
Query has no more records to return.
Query execution total time: 52.9711 ms.”
when I click Test…

If the Analyze button does not display the error do the following:

On premise you need to go to your app server, go to the Event Viewer, Applications and Services Logs, Epicor App Server and find your error.