1. Lawrence Anderson
  2. PowerBuilder
  3. Wednesday, 7 April 2021 16:29 PM UTC

We are moving from Powerbuilder 2017 R3 to Powerbuilder 2019 R2. Of 18 client computers where the updated application has been migrated, 17 have reported no issues, 1 can launch the application but gets error when interacting with the database (SQL Server 2019 15.0.4083.2). The error is "Error loading client library DLLs. Unable to connect to server." Based on our error handling arose after executing "CONNECT Using SQLCA;" which resulted in "SQLCA.SQLCODE = -1" and "SQLCA.SQLDBCode" having value other than -103 (for which we believe the error to be an incorrect SQLCA.LogId or SQLCA.LogPass). As part of a login window, the OK clicked event begins as follows

string s_achUserID, s_achPassword
string s_achExtra
date s_dttoday
string s_achTime
string s_achComputerName

SetPointer(HourGlass!)

s_achUserID = sle_userid.text
s_achPassword = Trim(sle_pass.text)
s_achExtra = ""

SQLCA.DBMS = "SNC SQL Native Client(OLE DB)"
SQLCA.LogPass = "sql_server_password"
SQLCA.ServerName = "production_server"
SQLCA.LogId = "sql_server_login"
SQLCA.AutoCommit = False

SQLCA.DBParm = "Database='db_name',AppName='ApplicationName',Host='" + s_achuserid + "',Provider='SQLNCLI11'" // SQL Server 2012 and newer

CONNECT Using SQLCA;
If SQLCA.SQLCODE = -1 Then
   If SQLCA.SQLDBCode = -103 Then
      MessageBox("Error","Cannot Connect to Database - Invalid UserID or Password.")
   Else
      MessageBox("Error","Cannot Connect to Database " + SQLCA.SQLERRTEXT)
   End If
   sle_userid.SetFocus()
   Return
End If

As seen in attachment, it appears this error is being captured with SQLCA.SQLERRTEXT displayed to user. Rolling the user with issue back to an application build deployed with Powerbuilder 2017 R3 resolves the issue. 

Attachments (1)
John Fauss Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 17:43 PM UTC
  2. PowerBuilder
  3. # 1

1. Is the 2019R2 version of the PB app 32-bit or 64-bit?

2. Is the 2017R3 version of the PB app 32-bit or 64-bit?

3. Have you tried re-installing the SQLNCLI11 provider on the problem machine?

Comment
  1. Lawrence Anderson
  2. Wednesday, 7 April 2021 18:00 PM UTC
Good questions, should have specified.

1. 64-bit

2. 64-bit. I will add that I know this user was getting active updates of the application.

3. I haven't uninstalled and reinstalled. I believe I attempted a repair based on the error to no effect.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 7 April 2021 17:02 PM UTC
  2. PowerBuilder
  3. # 2

did you install sql server native client on the computer?  that is a Microsoft install , not PB.

Comment
  1. Lawrence Anderson
  2. Wednesday, 7 April 2021 21:05 PM UTC
@Armeen This was a 64 bit application in PB2017 R3 so it doesn't seem there should be any conversion needed.



@Chris My teammates installed that QFE in September on every computer with the Powerbuilder Runtime so we could require TLS 1.2 on the production server.
  1. Helpful
  1. Lawrence Anderson
  2. Thursday, 15 April 2021 14:12 PM UTC
Uninstalling and reinstalling driver dependencies seemed to fix this. Was not able to isolate where exactly the issue was.
  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.