1. Chen Mey Lee
  2. PowerServer 2020 or older (Obsolete)
  3. Tuesday, 5 January 2021 02:25 AM UTC

Hi

Below error pop-up after select drop-down list box (press tab) , how to fix this ?

Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 6 January 2021 07:19 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 1

Hi Chen,

As I mentioned in your ticket #5836. the root cause of the issue is line 'ls_old = this.getitemstring(row, ls_column)' in itemchanged event. PowerServer has more stringent type checking than PowerBuilder, and you can't use getitemstring to get the value of a datetime column. Though it doesn’t report any error in PowerBuilder, the return value is null.

Please use the getitemdatetime function to solve the issue.
For example:

string ls_column
datetime ls_new, ls_old

ls_column = dwo.Name
ls_new = datetime(data)
ls_old = this.getitemdatetime(row, ls_column)
IF ls_new <> ls_old OR IsNull(ls_old) THEN
pb_save.Enabled = TRUE
END IF

Regards,
ZhaoKai

Comment
  1. mike S
  2. Thursday, 20 May 2021 16:43 PM UTC
"PowerServer has more stringent type checking than PowerBuilder, and you can't use getitemstring to get the value of a datetime column. "



to add to this, you can't use getitemstring on any non-string column, not just datetime. so, for example, you get the same error with number/decimals. which i just ran into due to a typo for the column name today!
  1. Helpful
There are no comments made yet.
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 05:33 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 2

Hi Chen,

Please open a support ticket in the support portal and please provide a test case, Many thanks in advance.
https://www.appeon.com/standardsupport/

Regards,
ZhaoKai

Comment
  1. Chen Mey Lee
  2. Tuesday, 5 January 2021 05:45 AM UTC
Bug 5836 created. Thanks.
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 03:14 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 3

did you change anything in the datawindow or database, like the type of the column?

If so, you should do a full redeploy.

Comment
  1. Chen Mey Lee
  2. Tuesday, 5 January 2021 05:34 AM UTC
I did not change the column type and tried full deploy issue persist.

The column type is datetime , suspect EditMask.DDCalendar = Yes return date instead of datetime in powerserver.
  1. Helpful
There are no comments made yet.
Chen Mey Lee Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 03:12 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 4

 DBMS & version :-

 

 

PowerServer mapped to the same DB instance :-

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 5 January 2021 16:25 PM UTC
Hi Chen May;

Note that from the PS2020 documentation that the "ASE Native" driver only supports the SAP ASE DBMS version *15.0* and higher. For the older ASE 12.x DBMS releases, I believe that you would need to use ODBC instead.

Regards ... Chris
  1. Helpful
  1. Chen Mey Lee
  2. Wednesday, 6 January 2021 02:08 AM UTC
Hi Chris,

We used latest ASE as below,

Adaptive Server Enterprise/16.0 SP03 PL08 HF1/EBF 29398 SMP/P/x86_64/SLES 11.1/ase160sp03pl08x/3777/64-bit/FBO/Tue Mar 31 20:32:47 2020
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 6 January 2021 15:19 PM UTC
Hi Chen May;

Thank you for the ASE version update. In that case you should not be using "SYC" in your DB Profile or your PB native Apps. Instead, the setting should be "ASE".

As for PowerServer then .. make sure that you installed the 64bit ASE DB Client on the PS machine and not any SYC DB Client's. Also make sure that you are using the "ASE" connection option in you PowerServer Tookit's Application Profile for this PB App. This is what the PS Toolkit uses to align the generated SQL for your PS based Web/Mobile app.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Chen Mey Lee Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 02:41 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 5

Yes worked fine in PB app.

 

Below is the calendar drop-down properties :-

 

 

 

 

 

 

 

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 5 January 2021 02:57 AM UTC
Excellent. What DBMS & version are you using and is PowerServer mapped to the same DB instance?
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 5 January 2021 02:31 AM UTC
  2. PowerServer 2020 or older (Obsolete)
  3. # 6

Hi Chen May;

   Does the application work OK when run as a native PB App?

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.