1. Venugopal r
  2. PowerBuilder
  3. Thursday, 15 June 2023 13:28 PM UTC

Hi Team,

Greetings!

Our application utilizes a direct connection.  When users fail to connect to a database, they are forced to kill their session (when a connection failure occurs) and relaunch the application in order to reestablish a connection.


We experienced a DB disconnect issue in our application as a result of a network problem. Due to this, the application gets closed, so the user must restart it and log in again. Is there a way to connect to the database again in the event of a failure so that the re-login process is avoided?

The functionality for DB connections cannot be implemented throughout the entire application. Since there are almost 10K locations where SQLCA.SQCODE checks. Thus, we are unable to implement every area.

Is there a standard place to implement DB reconnection in case of failure?  

FYR. We are experiencing the following error due to a network issue.
Any option application will try to connect to the database until a successful connection after 2 to 3 seconds when the network is stable.

Note: Network issue most likely due to VPN.

 

 

 

Thanks in advance.

Venu

Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Friday, 16 June 2023 16:19 PM UTC
  2. PowerBuilder
  3. # 1

Alternatively, deploy your app as a PowerServer project.  This automatically partitions the data access logic to the server side so that there is no connectivity issue between the data access and the database itself.  https://youtu.be/66DIsDsisbE

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 15 June 2023 16:09 PM UTC
  2. PowerBuilder
  3. # 2

Hi Venugopal ;

  FWIW: I would go the "preventative" route and use a DB "Heartbeat" feature to ensure that a disconnect from either a network or DBMS timeout does not occur in the first place as once the DB Session has been terminated, there is no way to reestablish one safely to continue any DB "Transactions in progress".

  Here is an example of the DB Heartbeat feature that I use in my framework ... FYI: http://chrispollach.blogspot.com/2018/02/ifc2018r1.html

Regards ... Chris

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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.