1. Kwadwo Boahene
  2. PowerBuilder
  3. Thursday, 16 September 2021 14:41 PM UTC

There is something weird happening in DW rowfocuschanged  event. I simply pass a key like dw1.retrieve(key) which works sometimes and sometimes not(compiled version).

I do reset the dw before I pass the key. I have debugged and checked this several times and still can't figured it out. I usually click the row to pass the key which goes in there to retrieve the data. This works well in Powerbuilder classic (code) BUT when I compile it sometimes works and sometimes not and this happens in the complied version.  It retrieves the right number of rows but the actual data is replaced by zeros and ones - both fields numbers. It's just a simple dw1 retrieve.

I am using PowerBuilder 2019 R3 with DB2.

 

Thanks,

Kwadwo Boahene

 

 

Kwadwo Boahene Accepted Answer Pending Moderation
  1. Thursday, 16 September 2021 19:53 PM UTC
  2. PowerBuilder
  3. # 1

Tried this and it did not work.

 

Thanks,

Kwadwo

Comment
There are no comments made yet.
Kwadwo Boahene Accepted Answer Pending Moderation
  1. Thursday, 16 September 2021 19:52 PM UTC
  2. PowerBuilder
  3. # 2

I have been poking around and still haven't come up with a solution. Do you have any other suggestions?

 

Thanks,

Kwadwo

Comment
  1. Miguel Leeuwe
  2. Friday, 17 September 2021 07:43 AM UTC
Sorry no, since I've never seen it happening.

Could you produce a small sample application that reproduces the problem? That would probably already show you were it goes wrong.

regards
  1. Helpful
  1. Kwadwo Boahene
  2. Wednesday, 22 September 2021 14:38 PM UTC
Got it working by refactoring the code and using setfilter(0 and filter().



Thanks.
  1. Helpful
  1. John Fauss
  2. Wednesday, 22 September 2021 16:35 PM UTC
That's great news. Kwadwo! Thank you for letting us know what you did to resolve the issue. Would you please mark this question as Resolved?
  1. Helpful
There are no comments made yet.
Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 16 September 2021 15:12 PM UTC
  2. PowerBuilder
  3. # 3

If the rowfocuschanged() event that you are talking about is the one of dw_1 and you are doing a reset(), this might trigger a new rowfocuschanged event.

1. No need to do the reset()

2. Try doing the retrieve() doing it with POST: dw1.POST retrieve(key) 

Not sure, but see what happens.

regards

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 16 September 2021 14:48 PM UTC
  2. PowerBuilder
  3. # 4

Hi Kwadwo;

  It sounds to me that this might be an DB Driver issue. If I recall, the DB2 access is via ODBC. If so, please make sure that your DB2 ODBC driver(s) are up-to-date. If the problem persists, I would try enabling an SQL trace, as follows;

SQLCA.DBMS = "TRACE ODBC"

HTH

Regards ... Chris

PS: Also, check your SQLCA.DBParm field for any "weird" settings that might affect the DML execution. 

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.