Hi Manikandan,
I guess that I would recreate a new Attachment2 object, by copying the lines that I want to keep and specifying the Override = tYES and doing a File.Delete on the file I want to remove.
At the end, attach the new Attachment2 object to the PO (which isn't done in your code.
I agree, it could be eathier...
Regards,
Eric