Logging a SQL exception error

,

I have a an error that is irritating me a bit

In the App server event log I see:

Ice.Common.EpicorServerException: String or binary data would be truncated.
The statement has been terminated. —> System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.

I suspect a data size issue

What I need to find is the actual SQL so I can find the data that is causing rhe issue

I have tried turning on app server trace, but dont see any SQL.

Can this be done.?? May be a ‘hidden’ debug option??

I have also tried to trawl through a SQL profiler log, but so far havent found the needle in that particular haystack

What trace flags did you try?

There is <add uri="profile://system/db/epiprovider/sqltext" /> to dump EF statements
and <add uri="profile://ice/fw/DynamicQuery/BaqStatement" /> to dump BAQ statements

I tried switching on all the options in the application server settings gui under ‘tracing settings’

Can you share a screenshot of those settings? I usually do it manually so I don’t know if the GUI shows the same or not.

the opitions I mentioned are in AppServer,config in server folder, they are not in GUI.

I assume when I edit AppServer,config manually then i need an app server restart for them to take affect?

I don’t think it is needed, but I always do it just in case.

No, it is not needed in this case.

Does the App Server detect when this file is modified??

I have lots of lovely logging now :o

Just need to work out the order of events…

Does the App Server detect when this file is modified??

yes, it monitors file change on disk

Typically I have seen this when:

  1. You have an RDD and you try to include many labels (there is a SSRS limit)
  2. You are trying to add more into a field than it can handle
  3. You have an RDD with a long caption
  4. Company Config setting for Workstation Name

Remember to disable the logging or just what you don’t need so that disk space does not get eaten up.

1 Like

I have tracked down the errant data directive and and the piece of code where someone is trying to write to a string field with a value that is too long!

2 Likes