I have made the following change in the EditItems function. Instead of using oRec:Save() directly, I have add another function ItemSaved() and Ithink the problem solved. I have used the original datarow.prg. Of course some more lines like oRsItems:ReSync(), oBrw:RefreshCurrent() is needed. static fu...
Mr. Rao, since the oRec:Save() returns false the execution waits in the edit dialog. In this case there is nothing to do in the edit dialog. Instead of waiting in the edit dialog, may be we have to show an error message that says record has been deleted by another user and go back to browse.
This is what is happening in my tests: If the save fails due to some reason like duplicated unique field, the record pointer does not change and edited values are not lost. They are retained. If the save fails because the record is deleted by another user on the network, then the record pointer is m...
The record pointer goes to the first record and changes all of the fields of oRec with the values of first record and I loose everything that I have typed.
Thanks for the feedback. Now, please change the entire method SaveOBJ() in datarow.prg with this new method. METHOD SaveOBJ() CLASS TDataRow local lSaved := .t. local lNetChanged := .f. local aSaveData := {} if ::lReadOnly .or. ! ::Modified() return .f. ...
Can you please make this modification in \fwh\source\classes\datarow.prg and test? Please locate the following lines towards the end of method SaveOBJ() if !lSaved AEval( ::aData, { |a,i| a[ 2 ] := aSave[ i ] } )&...
I have explained the problem step by step as below: Please, run the mariainv example of Mr. Rao 1. Open items and position the cursor on an item 2. Press the edit button and open the edit dialog 3. Now, when we are waiting here, another user has deleted the record that we are editing. 4. Edit the re...
Hi Mr. Rao, I have a similiar function in my program using DBF files. I have searched the "EditBaseRecord" function but I can't found in source of fwh directory. I think it is one of the hidden functions. Can you please share part of how to call "EditBaseRecord" ...