1. Jon Stoller
  2. PowerBuilder
  3. Thursday, 10 March 2022 11:26 AM UTC

Timeout Problem When Connecting to SQL Server Database:

I have a PowerBuilder Application that has been running live at several companies for many years.  The problem is just with 2 users at one company using the application.  Currently there are about 100 plus users at 5 different companies using the application, but only 2 users have this problem.  It just started a couple of weeks ago.  Recently 2 users at one of companies started getting a timeout message when they try to run the executable. 

 However, I want to explain something before I continue.  I don’t really think it is an error caused by the application.  The application has been running for years and never had this problem.  Nothing in the application has changed.  Also, only a couple of users at one site are having the problem. 

 I am sending this question to you to see if you have any insight into the problem.  Can you confirm whether or not it is a PowerBuilder application issue.  Is there anything I can do keep the connection from timing out.  Is there some advice you can tell me that can be done. 

 Note 1:  I thought about changing the Data Source from OLE DB to ODBC or SQL Server Native Client,  But OLE DB works fine for all the other users except these two with the problem.  And I believe when I upgraded to SQL Server 2016 (from 2008R2) I had some small problems with Native Client and ODBC in some parts of the application.      

 Note 2:  The first thing the application does is display a login window.  The user enters his/her password.  There are some other default parameters parameters as well – the User ID, the Database Name, the Data Source (i.e. ODBC, SQL Server Native Client, OLE DB, etc.) and the Server where the database resides.  The user only needs to enter a password, the rest are defaulted into the window from an INI file.    

Login Window:     See the attachment POPSS-Login_b.jpg

Then the user clicks on the “OK” command button and the application attempts to connect to the SQL Server Database and Log On the user.

Timeout Error Message:     See the attachment AMC_POPSS timeout_message.jpg

PowerBuilder Script Code:    

The current application is built using Appeon PowerBuilder 2017.  The database is Microsoft SQL Server 2016.  It has been running at a number of client sites since 1994, for many releases of PowerBuilder and SQL Server.  We never had this problem prior to a couple of weeks ago when this started.  .    

 This company does not use MS SQL Server for anything else except for my application.  

 The timeout problem does not happen consistently.  Some days it happens, some days it does not.  Sometimes they can restart their PCs and the problem goes away.  

 Some of the code is as follows: See the attachment POPSS-Login_c.jpg

 

 

Attachments (3)
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 10 March 2022 12:53 PM UTC
  2. PowerBuilder
  3. # 1

Hi Jon;

   FWIW: I've had something like this happen a few times in my 30 years dealing with PB Apps. On both cases, the problem turned out to be a bad router.

Regards .... Chris

Comment
  1. mike S
  2. Thursday, 10 March 2022 14:33 PM UTC
network issue. bad router could be the problem but if it is just those machines and if other people in that location can get to it, then the router is probably fine. what is different with those 2 users?

are there any VPNs involved?

try using the IP address instead of the server name - maybe you have a bad DNS server setup somewhere

you can try to ping the database server to see if they can get to it all - i'd do this when they say they are getting that error message.

check firewalls on the client machine and the server and any network hardware to see if they are blocked.





  1. Helpful 1
  1. mike S
  2. Thursday, 10 March 2022 14:36 PM UTC
this is rather unlikely , but you might try fixing the sql server's port to 1433 if you only are running a single instance on that server. it is possible the sql server port changed and that port is not getting through to those 2 client machines.

  1. Helpful 1
  1. Chris Pollach @Appeon
  2. Thursday, 10 March 2022 14:44 PM UTC
FYI: I've also seen the situation where the Router was OK but one or two network cables were bad. Especially, when one cabling guy put a staple though the cable so that it was not sagging as much. LOL!
  1. Helpful 1
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.