1. Arnd Schmidt
  2. PowerBuilder
  3. Wednesday, 26 June 2019 10:33 AM UTC

We deploy WebServices to IIS via PowerBuilder. This is a migration project (EA Server (PB 12.5) => IIS (PB2017 R2 Build 1769).

In the application framework the usage of assigning the row data to a nonvisual object is quite often used.

During the migration process (EA Server (PB 12.5) => IIS (PB2017 R2 Build 1769) we are facing problems with datawindow's dot notation.

Some Code here:

jn_cst_vor_umsatz_data lnv_data

lnv_data = adsv_data.Object.Data[ll_row]

//------------------------
// Some debugLog to check NULL vs. 0
decimal ldec_umsa_umsa_blz_pa
ldec_umsa_umsa_blz_pa = adsv_data.GetItemDecimal ( ll_row , "umsa_umsa_blz_pa" )
This.of_DebugLog(SCRIPT_NAME, "umsa_umsa_blz_pa (via GetItemDecimal): " + This.of_StringNull(string(ldec_umsa_umsa_blz_pa)))
This.of_DebugLog(SCRIPT_NAME, "umsa_umsa_blz_pa (via object assignment): " + This.of_StringNull(string(lnv_data.idec_umsa_umsa_blz_pa)))
//------------------------

For values (that are set) the result is as expected:
2019-06-26 09:53:21 | DEBUG | jn_cst_vor_umsatz_fk | of_Validate(jn_ds) | 1 | umsa_umsa_blz_pa (via GetItemDecimal): 36050105 |
2019-06-26 09:53:21 | DEBUG | jn_cst_vor_umsatz_fk | of_Validate(jn_ds) | 1 | umsa_umsa_blz_pa (via object assignment): 36050105 |

But for NULL Values
2019-06-26 10:23:26 | DEBUG | jn_cst_vor_umsatz_fk | of_Validate(jn_ds) | 1 | umsa_umsa_blz_pa (via GetItemDecimal): NULL |
2019-06-26 10:23:26 | DEBUG | jn_cst_vor_umsatz_fk | of_Validate(jn_ds) | 1 | umsa_umsa_blz_pa (via object assignment): 0 |

So my questions are:

- Has anyone seen this error/behavior before?
- Is dot notation (object assignment) not supported for IIS WebService Deployment?
- Is that a bug in PB2017 R2 Build 1769?
- If this is a bug, was it already fixed in PB 2017 R3?

I added a small webservice application that shows the behavior. The Method of_check1 shows 0 vs. NULL in my current Environment (Remark:  There is no Chance for me to update my environment)

Any comments and hints are welcome!

 

Arnd

 

Attachments (1)
Arnd Schmidt Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2019 13:58 PM UTC
  2. PowerBuilder
  3. # 1

Hi Brad,

la_value = adsv_data.Object.umsa_umsa_blz_pa[ll_row]

works fine, but the question is not related to a single value.

To your question:

The exisitng Framework uses this "handy" stuff to pump data from a row into a nonvisual "data" class and also back, like

adsr_data.Object.Data[ll_row] = lnv_data

These nonvisual "Data Objects" are used by different classes and functions, so it would be risky to Change function signatures etc.

Back to my question:

Is that a bug or a feature?!

Arnd

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Wednesday, 26 June 2019 13:29 PM UTC
  2. PowerBuilder
  3. # 2

Why are you using an interim object instead of grabbing the data directly?

What happens if you use your assign like this:

any la_value
la_value = adsv_data.Object.umsa_umsa_blz_pa[ll_row]

This will avoid using an interim object to hold the row data, and should accurately transfer the null or value to the var.

Comment
  1. Arnd Schmidt
  2. Sunday, 7 July 2019 16:44 PM UTC
I installed PB 2017 R3 Build 1880 on my private maschine and the "feature" still exits.

NULL Values are not beeing set when assigning rowdata to an nvo.

I am gonna write an extra function in all nvo data classes to fix that missing / buggy feature.

No hug for the datawindow today ;-)



  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.