no ROW-STATE modified

Posted by bart.syryn on 29-Nov-2017 10:16

Hi, Maybe a stupid question, but I have a dataset and a temp-table (+ before) where tracking-changes is set to true. In a field I change 'abcde' to 'abcdë', so 'e' is changed in 'ë'. How comes that this doesn't creates a before-record and the row-state isn't set ? Kind regards Bart S.

Posted by Torben on 29-Nov-2017 10:40

This works for me utf-8 and ICU-UCA:

DEFINE TEMP-TABLE tt BEFORE-TABLE btt
   FIELD cf AS CHARACTER.
DEFINE DATASET ds FOR tt.
CREATE tt.
tt.cf = "ABCDE".
TEMP-TABLE tt:TRACKING-CHANGES = TRUE.
tt.c = "ABCDÉ".
FIND FIRST btt.
MESSAGE  
   BUFFER tt:ROW-STATE SKIP
   btt.c SKIP 
   tt.c
   VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
Result is:
2
ABCDE
ABCDÉ

All Replies

Posted by Torben on 29-Nov-2017 10:40

This works for me utf-8 and ICU-UCA:

DEFINE TEMP-TABLE tt BEFORE-TABLE btt
   FIELD cf AS CHARACTER.
DEFINE DATASET ds FOR tt.
CREATE tt.
tt.cf = "ABCDE".
TEMP-TABLE tt:TRACKING-CHANGES = TRUE.
tt.c = "ABCDÉ".
FIND FIRST btt.
MESSAGE  
   BUFFER tt:ROW-STATE SKIP
   btt.c SKIP 
   tt.c
   VIEW-AS ALERT-BOX INFORMATION BUTTONS OK.
Result is:
2
ABCDE
ABCDÉ

Posted by bart.syryn on 29-Nov-2017 12:32

Hi,

You are correct, that works.

I finaly found it, Somewhere in the code I do a BUFFER-COMPARE on the Temp-table and before-table. That was the one causing the problem.

Adding BINARY in the BUFFER-COMPARE solved it.  It seems that BUFFER-COMPARE without BINARY doesn't see the difference between E and Ë.

Thanks for helping me.

Kind regards

Bart

Posted by bart.syryn on 29-Nov-2017 12:33

Hi,

You are correct, that works.

I finaly found it, Somewhere in the code I do a BUFFER-COMPARE on the Temp-table and before-table. That was the one causing the problem.

Adding BINARY in the BUFFER-COMPARE solved it.  It seems that BUFFER-COMPARE without BINARY doesn't see the difference between E and Ë.

Thanks for helping me.

Kind regards

Bart

This thread is closed