1

I'm editing a column in a window but it does not save the data when I input it for the first time, but after I close the window and repeat the whole process the data is saved.

Ruth
  • 69
  • 1
  • 9

1 Answers1

1

Are you leaving the column before doing the save? If not, the change may not get saved. You may need to do an AcceptText() in that case.

Slapout
  • 3,759
  • 5
  • 40
  • 61
  • I have tried using AcceptText() but not working, why is it that if i repeat the same it saves? – Ruth Feb 29 '16 at 14:45
  • It's been a couple of years since I used PowerBuilder. But from what i recall if you don't move the cursor from the field then the new value won't be written to it. I'm not sure why it's not working for you. – Slapout Feb 29 '16 at 20:54
  • I agree with this answer. What type of column, a standard column, or column with drop down datawindow attached? Are you sure you're doing an AcceptText and checking the return code? Sometimes AcceptText can fail. Second, and probably dumb question, you are performing the update statement in all code paths, correct? How about commit, is that happening? Are you using multiple transaction objects? Is there code in the editchanged or itemchanged events of the datawindow that could be conflicting? – Rich Bianco Mar 18 '16 at 08:55