I migrated a Powerbuilder application from 8.0 to 2019 R2. I have a Getchild call that is returning -1 but it works in 8.0. There have been no modifications. Is there something I should consider about the datawindowchild after a migrationmigra?
Hi, Raymond -
I can understand how frustrating this situation is for you.
If I were in your shoes, I would get "out of the box creative" to see if I could perform the same or similar GetChild and get return code of 1...from anywhere in the window - here are some ideas:
1. Declare another DataWindowChild reference variable and try the GetChild using the new variable.
2. If the failing DataWindowChild reference variable is an instance variable, see if a locally-scoped variable works.
3. Try issuing the GetChild from other scripts in the same window. Maybe even temporarily adding a "Click Me!" command button to the window and test the GetChild in the Clicked event.
4. Code a new GetChild call in a window function, then call that function from the spot where the failing GetChild is being called from now. Call it normally (Trigger), try it by Posting the function call.
5. Verify the requested column name exists in the DW, not only by inspection, but try issuing a Describe function that references a property of that column object, then check the result.
I'm sure that are other things you can try...these are what I thought of while typing.
Hopefully you will discover one or more ways to successfully invoke the GetChild function. If that doesn't give you any clues why the original GetChild is failing, report your findings back here (specifically, what you tried, what worked, what didn't work) and we'll bonk our collective heads around some more.
- John Fauss
- Friday, 26 February 2021 20:26 PM UTC
Regards ... Chris
- Chris Pollach @Appeon
- Friday, 26 February 2021 21:11 PM UTC
FWIW: I have lots of R2 Test Apps that use a GetChild and there are no GetChild issues logged in the Appeon Support DB. So you might need to review your App's code. Especially where & when the command is used as since PB 8 - some events have a different timing order. This was mainly done by Sybase in the PB10 (new Unicode era), PB 11.x (.Net support) and PB 12.x as 64 bit support was added. Appeon added a few changes to that area as well in PB2017=>2019.
Regards ... Chris
When you migrated, did you checK the AUTO-CONVERT button, as well as the WARNING and ERROR messages options?
If so, then what do you get when you run the dddw:
1. in the dw painter?
2. in the app in debug mode?
3. when you take and simply run the sql for the dropdown?
I run it in debug mode and I get -1 on the Getchild call.
I did a retrieve on the datawindow in the dw painter and it retrieves the data.
- Raymond Longoria
- Tuesday, 23 February 2021 21:02 PM UTC
- Page :
However, you are not allowed to reply to this question.