Hi, I've noticed the same on some web servers, where we typically have product images stored externally from the product database. After deleting the product record, sometimes the image file deletion fails. In this case we trap that and queue it for later deletion in a nightly process. Eventually they delete ok. ISTR it was IIS holding on to them, say if someone was viewing the image at the time. This was a few years ago so I don't recall the details. regards, Steve
________________________________ From: Colin/Mina [mailto:[EMAIL PROTECTED] Sent: Sunday, 29 June 2008 3:40 p.m. To: DUG, - Delphi Subject: [DUG] Delete (File) Function ? Hi, I'm having a problem deleting a database file where PathN is a string containing the directory name eg: 'c:\Test' and FileN is a string containing the file name eg: 'New Record.dbf'' Using - if FileExists(PathN + File) then begin ShowMessage('File Exists'); // and it does if DeleteFile(PathN + 'New Record.dbf') then ShowMessage('File Deleted') // and it does occasionally else ShowMessage('File Not Deleted'); // and it does mostly end; Note if I modify the code and use the 'Erase' procedure results are the same. Any clues as to why this oddity occurs? Thanks No virus found in this incoming message. Checked by AVG. Version: 8.0.101 / Virus Database: 270.4.2/1523 - Release Date: 28/06/2008 7:00 a.m. _______________________________________________ NZ Borland Developers Group - Delphi mailing list Post: delphi@delphi.org.nz Admin: http://delphi.org.nz/mailman/listinfo/delphi Unsubscribe: send an email to [EMAIL PROTECTED] with Subject: unsubscribe