Problem:
When we are trying to access Application, Screen, View we receive an error.
“An error has occurred executing a Sql statement. Please continue or ask your systems administrator to check your application configuration if the problem persists.(SBL-DBC-00105)”
Reason:
This error only comes when there is something wrong in the configuration. Some of the reasons can be
- BC containing reference to invalid or non existing column name.
- BC containing a Field without a column.
- Wrong configuration of a join in BC.
- Runtime events are referring to wrong fields in condition section.
- Data Validation manager rules are referring to deleted or inactive fields.
There could be other reasons also but they all point in one direction that your configuration is not right and the resulting SQL statement from that configuration is producing an error on database
Solution:
Following steps can help you to isolate and rectify the problem.
- Start your dedicated client after enabling the spool.
This post contains details of how you can do that. - Navigate to that view, screen or applet where you face that problem.
- Close the Client after you see the error.
- Open the spool file that was created.
- Scroll down to the end of the file and start reading upward from there.
You will see various SQL statements, you need to identify the statement that has error associated with it.
Copy that SQL and open Toad or SQL Developer if it is server database.
Open dbisqlc.exe if it is local env.
Run that SQL statement you just copied and you should be able to identify the problem.
In most cases it is reference to invalid column in a join or select statement.
Hope this helps.

1 Comment at "An error occurred excecuting SQL statement – Root Cause?"
This error also occurs when any of the below mentioned tasks are carried out:
1.when a database copy is done from one environment to another and srf from the source is not copied on to the destination and not in synch.
2.After code migration is carried out and resulting in extension columns not being recognized.
3.Can also occure after a Db restore resulting in duplicate tables in the Db.
Comment Now!