1. Kelvin Doan
  2. PowerBuilder
  3. Wednesday, 27 October 2021 12:43 PM UTC

We did converse on the  legacy PB application with version 7 to version 2019. Everything is OK. The application can run on my VDI (Windows 10), no problem but when I deploy it to user's VDI machine (Windows 10 installed) . The user got the error message "Login Failed" all the time , although he can login to database on the old legacy application (version 7) without any problem (same ID and password).  He has the same version of ASE as my VDI (version 15.xx.xxx). The new application is installed on network drive, user's machine has only its shortcut.  Do you have any ideas why it's happened ? . Thanks. 

Kelvin Doan Accepted Answer Pending Moderation
  1. Thursday, 28 October 2021 17:09 PM UTC
  2. PowerBuilder
  3. # 1

Thank you all responses. I found out that the text field of interface caused a truncation of password when it saved to variable if password entered is longer than text field. Nothing changed on interface but PB version 7 did not have problem, PB 2019 has a problem. 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 28 October 2021 17:49 PM UTC
Hi Kelvin ... I suspect that the issue is ANSI vs Unicode or "single-byte" (PB < version 10) vs "double_byte" (PB versions >=10). So in PB 7, the password is 7 bytes internally vs PB 10 & higher where the password is actually handled as 14 bytes internally (even though the user types 7 characters).
  1. Helpful 1
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Thursday, 28 October 2021 14:11 PM UTC
  2. PowerBuilder
  3. # 2

Is your database case sensitive with regards to the user name and password?

Is there code in the app the either UPPERS or LOWERS either the userid or pwd?

Ensure that you are passing the userid and pwd EXACTLY as they are entered to the database.

Comment
There are no comments made yet.
Kelvin Doan Accepted Answer Pending Moderation
  1. Wednesday, 27 October 2021 17:33 PM UTC
  2. PowerBuilder
  3. # 3

Thank you for your response. 

1. The SQLCA connection settings that your PB App is using

After getting information from Login window:

SQLCA.ServerName = <getting server name here>

SQLCA.Database = <getting database name here>

SQLCA.LogId = <getting user ID text here>

SQLCA.LogPass = <getting user password text here>

Then I use Connect using SQLCA ;

 2) After the CONNECT; command the DBMS return code and error text returned by the DBMS

I use Message.DoubleParm to connect database , if Message.DoubleParm = 1 then Connect using SQLCA

After connection , check error using SQLCA.sqlcode <> 0

3) The results of an SQL trace from your App

When I login ,it’s fine , no error .

(07AB0008): LOGIN:

(07AB0008): SRV 10  #5701  Changed database context to 'xxxx'. (0.004 MS / 0.004 MS) (17.072 MS / 17.076 MS)

(07AB0008): CONNECT TO TRACE ASE ADAPTIVE SERVER ENTERPRISE:

(07AB0008): DATABASE=xxx database

(07AB0008): LOGID=xxxxxID

(07AB0008): SERVER=xxxx

(07AB0008): DBPARM=Host='xxxxx’

(07AB0008): SRV 10  #5701  Changed database context to 'xxxxx'. (0.001 MS / 17.077 MS) (0.623 MS / 17.700 MS)

(07AB0008): PREPARE: (0.001 MS / 17.701 MS)

DBMS on PB version 7

sqlca.dbms="SYC SYBASE System 10 CTLIB"
sqlca.dbparm = "release='11.0',async=1"
sqlca.autocommit= TRUE

DBMS set up on version 2019

SQLCA.DBMS = "ASE Adaptive Server Enterprise"
SQLCA.DBParm = "Release='16'"
SQLCA.AutoCommit = True

 

Comment
  1. Chris Pollach @Appeon
  2. Wednesday, 27 October 2021 17:51 PM UTC
Hi Kelvin;

Thank you for that information! I see that your App is using ASE 15.x - thus ...

1) SQLCA.DBMS = "ASE" // OK

2) SQLCA.DBParm = "Release='15.5'" // not 16

3) Do not mix ASE 16.x DB Client drivers with ASE 15.x drivers (workstation). If your using ASE 15.x then use it's DB Client drivers

4) Make sure that you install the ASE DB Client drivers that match your App EXE's bitness.

5) Make sure that the ASE server and DB instance is correct that matches your expected DB Schema.

6) Make sure that your AS Login UserID has the appropriate rights to the DB Schema your connecting to.

7) Double check your ASE's SQL.INI settings (where your server ge's its DBMS server's IP address (DNS) from.

HTH

Regards ... Chris





Regards ... Chris

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 27 October 2021 14:47 PM UTC
  2. PowerBuilder
  3. # 4

Hi Kelvin;

  The key is to know ...

1) The SQLCA connection settings that your PB App is using

2) After the CONNECT; command the DBMS return code and error text returned by the DBMS

3) The results of an SQL trace from your App

   ie:  SQLCA.DBMS = "XXX"   // currrently

        SQLCA.DBMS = "TRACE XXX" // changed code for tracing

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.