This topic is locked

Upload ( Global ) delete file when associated record deleted

2/2/2006 11:41:51 PM
ASPRunnerPro General questions
lefty author

I was in need of the new feature to delete associated uploaded files when the record is deleted. I was testing this option and I am getting the following error message when I check off the box to delete file that is associated with record in list mode.
Microsoft VBScript runtime error '800a0035'

File not found
/Output6/include/commonfunctions.asp,
Debug mode:

List:
select [Key], [Club_Id], [Tournament_Name], [Upload_Tournament_File], [Starting_Date], [Ending_Date], [Format], [OtherNotes], [Tees], [Chairman/Officials], [Chairman/Officials Email], [Prizes], [Pairings], [Upload_Pairings_File] From [Schedule] where ([Schedule].[Club_Id]='22') ORDER BY [Ending_Date] ASC

select count(*) From [Schedule] where ([Schedule].[Club_Id]='22')
Edit View:

select [Key], [Club_Id], [Tournament_Name], [Upload_Tournament_File], [Starting_Date], [Ending_Date], [Format], [OtherNotes], [Tees], [Chairman/Officials], [Chairman/Officials Email], [Prizes], [Pairings], [Upload_Pairings_File] From [Schedule] where (([Schedule].[Key]=24)) and ([Schedule].[Club_Id]='22')
I am also getting this error when uploading some files; but not all of them
ADODB.Stream error '800a0bbc'

Write to file failed.
/Output6/include/commonfunctions.asp,
This only happens with the new feature in 4.0 checkbox to delete associated file when record is deleted.
Any idea on this?

admin 2/3/2006

Thank you for pointing me to this issue. We'll fix it in the next ASPRunnerPro update.
To get your pages working now please modify DeleteFile function in INCLUDE/commonfunction.asp file. Please see my changes in Bold.

sub DeleteFile(strFileName)

Set fso = CreateObject("Scripting.FileSystemObject")

if fso.FileExists(strFileName) then

fso.DeleteFile(strFileName)

end if

set fso = Nothing

admin 2/3/2006

John,
I wasn't able to reproduce "Write to file failed" error.

Please zip and send generated ASP files to support@xlinesoft.com along with project file and your sample database for investigation.

lefty author 2/3/2006

John,

I wasn't able to reproduce "Write to file failed" error.

Please zip and send generated ASP files to support@xlinesoft.com along with project file and your sample database for investigation.


My Directory folder seems to have been corrupted. After creating a new directory ; problem seems to have been corrected. will further test with new code above for "file not found".