I am sorry

January 13, 2002 by Waldo Smeets
Piero, I am very sorry but I am not able to help you at the moment. I am already having a hard time keepig up with everything that's going on in our zones. And with the conference only a few weeks away I really need to set some priorities. Sorry mate...

Multiple Delete When Image Field Empty

March 26, 2002 by Paul Gee

Excellent extension, however, if I have a database full of details where some people have and some people haven't uploaded images, the delete functions seems to stop whenever it comes across an empty image field.

If I try to run it on a table where an image field is always present it works just fine.

I know this is only a Beta version, but have you any ideas how I can work around this other than re-running the delete until all the records have gone? Thanks.

RE: Multiple Delete When Image Field Empty

March 26, 2002 by Piero Mattirolo

I haven't tested this, but it should do the job.

replace the code in the corresponding block with:

<%
Do While rsDel.EOF=False
dim TempPath
TempPath=(Server.Mappath(("YourSubfolder") &"/" & rsDel("Your DB__Field__with__File__Info")))   
rsDel.Delete
if File.FileExists(TempPath)=1 then
File.DeleteFile(TempPath)
End if    
rsDel.MoveNext
Loop
rsDel.Close
Set file="Nothing"
Set rsdel="Nothing"
else Response.redirect("Redirect__page_if__no__selection__made")
end if
Response.Redirect "Redirect__page_after__delete__action"
%>

Let me know if this helps and best regards,

 

Piero Mattirolo

RE: RE: Multiple Delete When Image Field Empty

March 26, 2002 by Paul Gee

Piero,

Thanks, this does now delete all the records in the table, but as soon as it comes across an empty image field it stops deleting the rest of the associated files.

See all 15 Comments