Bug 5268

Getting different results when reading a computed column's value using .object... or .GetItemstring(... 17 September, 2020

Miguel Leeuwe
16 September, 2020
Product: PowerBuilder Category: DataWindow
Version: 2019 R2 Build:
Classification: Sybase (legacy) bug Publishing: Public
Priority: P3
Status: Scheduling Reason:
Miguel Leeuwe 17 September, 2020
Maybe it's also good to know that GetFormat() does not work on a Computed Column, we have to do a Describe() when it's a computed column.
Ken Guo @Appeon 17 September, 2020
Hi Miguel,

Thanks for reporting this problem! We reproduced it on our end and will do further research to figure it out. We will keep you posted about the progress.

BTW, PB 12.6 has the same issue as well.

Miguel Leeuwe 16 September, 2020
Thank you!
Chris Pollach @Appeon 16 September, 2020
Hi Miguel;

   Thank you so much for the Test Case PB App! I was able to reproduce your issue.

   I will now transfer this ticket over to the main Support / Engineering team for their review & feedback.

Regards ... Chris
Miguel Leeuwe 16 September, 2020
For clarity, in the sample app I'm using "**" for the padding. Normally this would be 2 white spaces "  ".
Miguel Leeuwe 16 September, 2020
formats on computed string columns.zip (19KB)

To avoid column values being shown "tightly against" the column borders (which looks kind of ugly), we apply some left or right padding (one or 2 whitespaces) on the formats of our columns.
I recently applied this padding also on the format of computed columns and now have discouvered that there's a slight problem with string computed columns:
- the length of the read value includes the lenght of the padding: a 1 char result CC now returns 3 characters
- the read result is different when using .Object.... notation or GetItemString.

I've made a small sample application to explain and prove my point. (see attached).
Kind regards,

*Reproduce Steps:
run the sample app and click on the third button. (cb_3)

Happens also on PB2017 r3, not sure about 12.6.
Windows 10
Database Type:
Database Version: