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