1. Raymond Longoria
  2. PowerBuilder
  3. Friday, 2 April 2021 01:09 AM UTC

I have a datawindow (Powerbuilder 2019 R3) that returns -1 on Update() and the following message appears :

Datawindow does not have update capability.

I checked the update properties and they looked correct.

Suggestions?

Raymond Longoria Accepted Answer Pending Moderation
  1. Friday, 2 April 2021 15:49 PM UTC
  2. PowerBuilder
  3. # 1

Chris,

Here is the screenshot.

Comment
  1. Raymond Longoria
  2. Monday, 5 April 2021 16:44 PM UTC
Chris,

I followed your suggested steps and it was not resolved. I decided to test on another test database and the error did not appear. It runs out the a role was setup by the tester on the original database that prevented the user from updating the database table. I should have checked this before posting this question.

Thank you to everyone who helped me out!

  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 5 April 2021 16:53 PM UTC
Great! Just ignore my further suggestions, hadn't seen you resolved it already. (lacking refresh)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 5 April 2021 19:29 PM UTC
That's great news Raymond! ;-)
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 2 April 2021 01:42 AM UTC
  2. PowerBuilder
  3. # 2

Hi Raymond;

  Can you post a screen capture of the Update Property's dialogue for that DWO?

Regards... Chris

Comment
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Monday, 5 April 2021 10:06 AM UTC
  2. PowerBuilder
  3. # 3

If you are using PFC classes, see if there's a property / instance variable on the u_dw called something like "ib_isUpdatable". That one has to be checked on the dw control.

If I remember well (cannot access powerbuilder right now), there's also one called "is_updatesAllowed", which can be used to indicate which operations are allowed on the DW. (I=Insert, U=update, D=Delete).

regards

 

EDIT: I've been able to access powerbuilder, so here, marked in yellow the properties I was speaking about:

Comment
  1. Miguel Leeuwe
  2. Monday, 5 April 2021 16:50 PM UTC
Other things:

- Could it be that you have the datawindow repeated in another library (and when running that one is found, instead of the one you are looking at?)

- Are you dynamically changing the 'dataobject' of the datawindow control in the code?



that's about all I can think of.
  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 5 April 2021 16:50 PM UTC
Are you using SharedData() on this datawindow?

  1. Helpful
  1. Miguel Leeuwe
  2. Monday, 5 April 2021 16:51 PM UTC
(sorry that last one is ShareData() not ShareDData() )
  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.