1. Venugopal r
  2. PowerBuilder
  3. Monday, 14 August 2023 07:31 AM UTC

Hi Team,

Greetings!


I'd like to know how I can resolve and implement this feature in my application.

When the database connection fails, our application displays DB error messages wherever a DB hit operation is performed. However, the DB connection returned to normal after 2 or 3 minutes, but the system did not continue. As a result, the user is forcibly closing their application session and re-launching the application. To avoid that we are implementing the below approach.

To address this issue, we implemented the transaction object whenever a DB failure transaction object DB error event is triggered, and from there we try to close all open windows and show the DB-reconnect option window to the user to reestablish the connection. We have achieved this feature, but when we close all open windows, we receive the error message shown below. (Yellow highlights)

Please provide any suggestions and guide me how to achieve this feature in PB.

Also, is there a simple way to close all the windows that are open on top of the MDI frame? Please help.

Hope this issue is due to some memory league. I tried destroying option too but no luck. 

Thanks,

Venu

 

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Monday, 14 August 2023 12:31 PM UTC
  2. PowerBuilder
  3. # 1

Hi Venu;

 Have you thought about using the Restart() command instead?

Regards ... Chris 

Comment
  1. Venugopal r
  2. Monday, 14 August 2023 15:47 PM UTC
Hi Roland, Yes I tried the option.

I am using Restart() function in transaction object DB error event. Still I am getting the same error. i.e. highlighted in yellow above screen shot.
  1. Helpful
  1. Roland Smith
  2. Monday, 14 August 2023 17:56 PM UTC
Sounds like time to submit a bug report.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 14 August 2023 19:25 PM UTC
I've used the Restart() command in my STD framework for decades with no issues. Even up to the latest PB 2022 R2. So I suspect that some other weird things are going on in your App's code.
  1. Helpful
There are no comments made yet.
John Fauss Accepted Answer Pending Moderation
  1. Tuesday, 15 August 2023 05:04 AM UTC
  2. PowerBuilder
  3. # 2

Hi, Venu -

Look at the GetFirstSheet and GetNextSheet PowerScript functions to obtain a reference to each sheet window. There is a code snippet in the PB Help topic for GetNextSheet that shows how you can cycle through all of the sheet windows. Once you have a reference to a sheet window, use the Close PowerScript function to close it.

Best regards, John

Comment
  1. Roland Smith
  2. Tuesday, 15 August 2023 14:42 PM UTC
Since the sheets are being closed, GetFirstSheet in a loop would work better. Something like this:



Window lwSheet



lwSheet = ParentWindow.GetFirstSheet()

do while IsValid(lwSheet)

Close(lwSheet)

lwSheet = ParentWindow.GetFirstSheet()

loop
  1. Helpful 1
There are no comments made yet.
Venugopal r Accepted Answer Pending Moderation
  1. Wednesday, 16 August 2023 14:57 PM UTC
  2. PowerBuilder
  3. # 3

I tried all the options but still am getting the below error. I do not know how to resolve this. Could anyone please help. 
While close or restart I am getting this error.

Comment
  1. John Fauss
  2. Wednesday, 16 August 2023 15:36 PM UTC
I did a quick web search for "message a breakpoint has been reached" and it returned many hits that indicate this is an exception that is being raised by the Windows operating system. You may have malware or a problem with a hard drive or some other problem. From the couple of links I looked at, this problem does not seem to be caused by PowerBuilder. I suggest you do a similar search and investigate some of the possible causes/solutions.
  1. Helpful 1
  1. Venugopal r
  2. Wednesday, 16 August 2023 15:42 PM UTC
Yea John, I also did the same. I am wondering if system continues all the DB actions and thronging the message after that we didn't received that error. IF we try to close the window in between then i am getting the error.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.