1. Miguel Leeuwe
  2. PowerBuilder
  3. Tuesday, 21 May 2024 11:02 AM UTC

Hi all,

Does anyone have any idea on how to intercept this error message:

 

I've tried dwerror events, systemerror, updatestart, sqlpreview but no luck. The error does not seem to go through any event?

TIA,

regards

 

Accepted Answer
Benjamin Gaesslein Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 12:23 PM UTC
  2. PowerBuilder
  3. # Permalink

Yeah, looks like there's no way to catch this in code and there probably should be. Then again, calling Update() on a DW with no Update properties set is definitely a developer error that should be caught during testing. The error message could certainly be more helpful, especially in complex situations where multiple updates are handled in one step it's hard to find the one DW that fails. It doesn't help that PB likes to purge Update properties after other changes in a DW without even telling you.

Comment
  1. Miguel Leeuwe
  2. Tuesday, 21 May 2024 12:37 PM UTC
Yes, my problem is that there are more than 100 fields possibly being updated from a multitude of places in the application (it's a mess). If not, I could have just used a stored procedure for the update. Anyway, my workaround seems to work nicely!

Thanks!
  1. Helpful
  1. Benjamin Gaesslein
  2. Tuesday, 21 May 2024 13:27 PM UTC
I feel your pain and keep my fingers crossed that you figure out that mess.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 21 May 2024 13:32 PM UTC
:) thanks for the support.

in the end I made it work by setting the update table for the sp dw to the table I want to update using a Modify(), so now I'm no longer getting that error and in the sqlpreview event I just run the update sql using "execute immediate" and then return a value of 2.
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 11:54 AM UTC
  2. PowerBuilder
  3. # 1

Hi Chris,

Yes indeed, but no luck.

What I'm trying to achieve is the following:

- we had a slow retrieval of a dw so we decided to use a stored procedure, which greatly improved things.

- however, we didn't retest everything and any updates on that dw are now failing.

- so I wanted to intercept the update and do something with a shared datastore, or some other thoughts I had.

- in the end I made it work by setting the update table for the sp dw to the table I want to update, so no longer getting that error and in the sqlpreview event I just run the update sql using "execute immediate" and then returning a value of 2.

Problem solved, but find it weird that there's no way to intercept the error.

thanks,

regards.

 

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 May 2024 11:30 AM UTC
  2. PowerBuilder
  3. # 2

Hi Miguel;

 Have you tried the DW Control's "Error" & "DBError" events?

Regards ... Chris 

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.