We gone though the help document provided in the URL https://docs.appeon.com/ps2022/SQLCode_property.html
and need few clarifications on the return value.
PowerBuilder:
Currently in PowerBuilder SQLCode returns 100 - if stored procedure returns a result set which contains 0 data row,
SQLCode returns -1 , if stored procedure returns an error
PowerServer:
The powerserver help shows - SQLCode returns -1 if stored procedure returns a result set which contains 0 data row.
What will be the return code if there are any errors during the execution of SP?
Please provide any documentation related to SQLCode return values.
Thanks,
Gururaja udupa
https://docs.appeon.com/ps2022/Discrepancies_that_cannot_be_detected.html
As per the Appeon Docuementatoin for SQLCode property (with SP)- "If a stored procedure returns a result set which contains 0 data row, SQLCode property returns -1 in PowerServer but returns 100 in PowerBuilder."
But the behaviour we are seeing is different. We are expecting -1 from Powerserver, if the SP result set (from Inline execution of PB code) does not have any rows. But we are getting the SQLCODE return value as 0.
It is very difficult for us to handle in the code, if the return value is 0, as we do not know if this is a successful/no rows.