1. SHAMEEM KAKKAD
  2. PowerBuilder
  3. Wednesday, 12 January 2022 12:27 PM UTC

Hi,

I am using Appeon 21. 

I am using the idle event of the application to auto log off my project. while using this facility, totally my project going to hanging mode. 

have any advise in this case ?.

Thanking....

Who is viewing this page
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Saturday, 15 January 2022 14:32 PM UTC
  2. PowerBuilder
  3. # 1

Yes, that code could easily hang your App.

Use HALT CLOSE instead and don't forget to set the Idle timer off first.

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Saturday, 15 January 2022 07:33 AM UTC
  2. PowerBuilder
  3. # 2

Assuming that with "while close w_auto_logoff" you mean to say that you have coded the following in the close() event of w_auto_logoff ?

Change your code to:

-------------------------------

UPDATE "xxxxxxxx" SET "lstatus" ='O' WHERE upper( "xxxxx" ) = :uid_ ;
commit;

// commented: if this code is in the close event, you are already closing the window, so no need to call it again.
// close (w_auto_logoff)

HALT CLOSE // to stop and close the application
Comment
  1. SHAMEEM KAKKAD
  2. Saturday, 15 January 2022 07:44 AM UTC
Below mentioned reason have chance.

DB locked by the user...

Anyway, Thank you very much....
  1. Helpful
  1. Miguel Leeuwe
  2. Saturday, 15 January 2022 08:11 AM UTC
put a debug stop on the update statement and debug. If it never gets to the HALT CLOSE, then the table if probably locked.

good luck
  1. Helpful
  1. Chris Pollach @Appeon
  2. Saturday, 15 January 2022 14:36 PM UTC
The above DB updating is dangerous. In the Idle the DB connection you be expired. I would just Rollback & disconnect.
  1. Helpful 1
There are no comments made yet.
SHAMEEM KAKKAD Accepted Answer Pending Moderation
  1. Saturday, 15 January 2022 07:24 AM UTC
  2. PowerBuilder
  3. # 3

idle event

-------------------

if not isvalid (w_auto_logoff) then open (w_auto_logoff)

 

while close w_auto_logoff

-------------------------------
UPDATE "xxxxxxxx" SET "lstatus" ='O' WHERE upper( "xxxxx" ) = :uid_ ;
commit;
close (w_auto_logoff)

Comment
  1. Miguel Leeuwe
  2. Saturday, 15 January 2022 07:35 AM UTC
If your application still freezes, than maybe the "xxxxxxxxx" table is being locked by another user?
  1. Helpful
  1. SHAMEEM KAKKAD
  2. Saturday, 15 January 2022 07:42 AM UTC
Yes, have chance.

Thanks for your advice
  1. Helpful
There are no comments made yet.
David Peace (Powersoft) Accepted Answer Pending Moderation
  1. Thursday, 13 January 2022 09:30 AM UTC
  2. PowerBuilder
  3. # 4

We will need some more information in order for us to help. Please submit your idle event code.

Thanks

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 12 January 2022 13:48 PM UTC
  2. PowerBuilder
  3. # 5

Are you using the HALT or HALT CLOSE command in the Idle event to close the App?

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Wednesday, 12 January 2022 13:15 PM UTC
  2. PowerBuilder
  3. # 6

Hi,

What's your code to log off and close the application?

regards

Comment
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.