1. Gururaja Udupa
  2. PowerServer
  3. Friday, 2 February 2024 11:09 AM UTC

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

 

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 February 2024 16:50 PM UTC
  2. PowerServer
  3. # 1

Hi Gururaja ;

  Can you tell us ...

  • O/S version & build
  • PB version & build
  • DBMS version & build
  • Are you using In-Line or DataWindow SQL for SP interaction?
  • etc

Regards ... Chris

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 8 February 2024 13:49 PM UTC
Yes, you need to read the PS documentation very carefully for how it handles DBMS interaction vs the PB native DB drivers.

https://docs.appeon.com/ps2022/Discrepancies_that_cannot_be_detected.html

  1. Helpful
  1. Madhuri Kanagala
  2. Friday, 9 February 2024 10:44 AM UTC


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.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Friday, 9 February 2024 15:14 PM UTC
Please open a support ticket with a small test case that recreates this problem so our engineers can analyze and feedback. https://www.appeon.com/standardsupport/newbug
  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.