1. Enrique Perez
  2. PowerBuilder
  3. Friday, 9 August 2019 19:25 PM UTC

Hi,

My powerbuilder code calls a stored procedure that call many stored procedures; something like this

proc1->proc2->proc3->......

when there is an error on one of the stored procedures, dberror event is giving me the error code and syntax but no where the error ocurred(procedure name).

Is there any way to know the procedure that triggers the error?

Thanks

enrique

 

Olan Knight Accepted Answer Pending Moderation
  1. Saturday, 10 August 2019 05:10 AM UTC
  2. PowerBuilder
  3. # 1

Like Chris said, you should always include the name of the procedure AND the actual error code/text in your error messages.

 

Olan

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 9 August 2019 22:19 PM UTC
  2. PowerBuilder
  3. # 2

Hi Enrique;

   If Tobias's suggestion doesn't work for you. Try performing a RaiseError() command and include the procedure's name in the error text. Failing both of the above, have the SP write the error information to the DB log.

Regards ... Chris

Comment
There are no comments made yet.
Tobias Roth Accepted Answer Pending Moderation
  1. Friday, 9 August 2019 21:53 PM UTC
  2. PowerBuilder
  3. # 3

Which database are you using?

In sql anywhere Version 16+ you can use error_stack_trace to get that information.

I used that in procedures, but i think this could also work in powerbuilder. Never tried it. 

http://dcx.sap.com/sa160/en/dbreference/error-stack-trace-function.html

 

Comment
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.