Assuming the documentation is correct...
I would assume if the delete fails the return value will be false as described above.
However, if oWwBusiness.nDataMode = 0 the result is always returned .t. (true).
The screen shot below shows the code that is used...
What if any suggestions could be made to determine the actual status of the DELETE command. VFP does not return a value from the DELETE FOR that I'm aware which suggests one would need to know the record number before the DELETE and then test for the record deleted() status after the DELETE command was execuited. Seems like a lot of work...
In thinking a bit more about this and the limitations of VFP, mabe the most correct solution would be something along the following:
DELETE FROM (this.cAlias) WHERE &lcPKField == lnPk
IF _TALLY = 0
RETURN .F.
ENDIF
Any other thoughts?
As we discussed earlier this is by design.
A Delete
operation that doesnt' find a match is still considered a success because the deleted item is gone after all. Only hard failures will trigger a .f.
response.
+++ Rick ---