- Chris Lerwill
- PowerServer
- Wednesday, 19 April 2023 05:28 PM UTC
Most of my career I have had to maintain some other developer(s) code. With that in mind, I attempt to follow PowerBuilder's documented approaches for all the code I write. I have, however, seen code like what is shown below that works in a client/server application. Because the code works and I have to prioritize improvements/fixes, I practice the motto: If it ain't broke, don't fix it.
In a PowerServer application, however, I am finding that code like what is seen below occasionally crashes the application. Specifically, the RETRIEVE syntax.
if not a_exitscript then
i_stopnum% = GetItemNumber ( dw_lookup, 1, "number" )
Retrieve ( dw_det, "", i_stopnum%, "STOPS" )
end if
I have discovered that the fix is to, instead, have the syntax look like this...
if not a_exitscript then
i_stopnum% = GetItemNumber ( dw_lookup, 1, "number" )
dw_det.Retrieve( "", i_stopnum%, "STOPS" )
end if
Finally my question(s):
- Is something like what I described above not working in PowerServer because it is attempting to enforce better practices?
- I haven't dug-up any of my old PowerBuilder books, but does the original syntax work in a client/server application because it was allowed in an early version of PowerBuilder and now it is being tolerated by the compiler to allow backward compatibility?
- Is this an issue in PowerServer I should report?
Thanks for any input/advice.
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.