Hi
Right, so i've got this form, collecting data from user and populates a business object. One of the members is a TMemoryStream, that loads a file, all fine and dandy, but what happens when the user cancel in the midst?!? In short, i need to get rid of the data already loaded in the memorystream. Would this be a viable solution:
procedure TfrmEditBlob.btnCancelClick(Sender: TObject);
begin
TMemoryStream(fBlob.Blob).SetSize(0); // delete blob contents
fBlob.Blob.Position:= 0;
Close; // just forget everything
end;
TIA - Benny