Jump to content

Recommended Posts

Posted

Hi,

I am having a few troubles trying to get my code to work.

I am trying to extract recordset data from a database, which includes part of the file name, and then loop against this record set to check if a file with this name exists or not.

Does this make sense?

If I remove the loop and just perform the check on the first record it works OK.

Any Ideas?

Thank you in anticipation

Database table

Id Filename

1 A

2 B

3 C

4 D

5 E



set fs=Server.CreateObject("Scripting.FileSystemObject")

if rsfilename.eof then
response.write("<p align=""center""> Sorry, the database is empty</p>")
else
do until rsfilename.eof%>

if fs.FileExists("C:\Inetpub\filestorage\images\pic " & trim(rsfilename ("filename")) & ".jpg")=true then
response.write("The file pic" & rsfilename ("filename") & ".jpg does Exist.")
else
response.write("The file pic" & rsfilename ("filename") & ".jpg does not Exist.")
end if

loop
set fs=nothing
end if

Here is the error I get


Response object error 'ASP 0251 : 80004005'

Response Buffer Limit Exceeded

/coding/numberallocation/showracks.asp, line 0

Execution of the ASP page caused the Response Buffer to exceed its configured limit.


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...