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