Hello,
I've got a problem about my "DeleteRow" method.
What happens? Actually, after the method is called, one row is deleted but after 5 seconds we can get a message like this "no records in the Temp-Table ttCamion".
As for the DeleteCamion method, it just deletes the precise row thanks to the Id.
thanks for your help .
METHOD PUBLIC VOID DeleteRow( ):
DEFINE VARIABLE idCam AS INTEGER NO-UNDO.
DEFINE VARIABLE hQuery AS HANDLE NO-UNDO.
camionClGpds:SetTrackingChange("ttCamion", TRUE).
idCam = hdsCamion:GET-BUFFER-HANDLE():BUFFER-FIELD("IdCam"):BUFFER-VALUE ().
/* MESSAGE "avant remove"*/
/* VIEW-AS ALERT-BOX.*/
/* MESSAGE "après remove"*/
/* VIEW-AS ALERT-BOX.*/
hQuery = THIS-OBJECT:GetCurrentQuery().
bsCamion:RemoveCurrent().
camionClGpds:DeleteCamion(STRING(idCam)).
hQuery:DELETE-RESULT-LIST-ENTRY ().
THIS-OBJECT:Sauver().
RETURN.
END METHOD.
Try removing the call to RemoveCurrent(), and add bsCamion:Refresh() after DELETE-RESULT-LIST-ENTRY.
Where is the call to actually delete a record in the original sample? I see a call that probably enables TRACKING-CHANGES, but no actual deletion of a record.