- Darren Longenecker
- PowerBuilder
- Friday, 3 June 2022 08:57 PM UTC
When the DB connection fails in our app, there *can* be many SQLSTATE = 08S01 errors that annoy the users.
What they'd like is for the app to reconnect if disconnected.
I'm trying to, firstly, circumvent all the exceptions, but having trouble.
I've tried messing w/ the error, dberror, and systemerror events but I'm not getting it.
I tried this (adding my own message and returning 1) but it just adds my own messagebox in addition to the error popups: https://docs.appeon.com/pb2019/datawindow_reference/ch08s12.html
I use SQLCA. My testing involves logging into app, then killing the connection within SQL Server, then trying to retrieve a dw in the app, thereby forcing the 08S01 error.
I'll get this error first:
Then (n) number of these:
Ideally, I'd like to pick out the error code behind the scenes, if it's 08S01 then alert user that I'll try to reconnect. Then if cant connect, alert user and exit.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.