- Jim Nesbitt
- PowerServer
- Tuesday, 13 December 2022 11:37 AM UTC
Our applications use Dynamic SQL Type 4 to execute SQL server select statements and stored procedures which return a single row.
We use Dynamic SQL Type 4 as we have a user object that executes the SQL and does all the necessary checking. It returns the result-set columns as an array of any values.
This works fine in our existing Powerbuilder 2017 application. When I run the converted code in PowerServer 2022, I got errors assigning the returned values to typed powerbuilder variables.
I've attached a picture showing the debugger screen. All the SQLDA.OutParmType values are returned as NUL. The CASE statement executes the command assigningTypeString, so all the returned array any types are all strings. This causes an error when the returned value is assigned to a numeric variable.
It can be resolved by explicitly converting the any variable
ll_curr_connections = aa_data [1] to ll_curr_connections = INTEGER ( aa_data [1] )
but this function is called numerous times.
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.