ChrisCurzon
IS-IT--Management
We have a PowerBuilder application connecting to an Oracle database. The app uses PowerScript to send SQL to the database. The app also uses data windows (with SQL queries as the data source) to interact with the database.
It might happen that a SQL statement (either in PowerScript or supporting a data window) fails for any of a number of reasons. For example the user might not have privilege to SELECT from a table. Or the data may violate an integrity constraint.
I need to know whether it is possible...
1) To trap a SQL error in PowerScript without crashing the PowerBuilder application. Also, is it possible to fetch the FULL error message text so that application can write it to a session log file?
2) To trap an error from SQL supporting a data window without crashing the PowerBuilder application. Is it possible in this case to fetch the FULL error message text so that application can write it to a session log file?
Right now, it seems as though SQL which supports a data window causes the entire application to crash, if there is a database error. And it seems as though SQL which is used in PowerScript only shows part of the error message text, not all of it.
Any help, example code, concepts, references, would be appreciated. I will pass it onto the PB app programmer.
Thanks in advance,
Chris Curzon