Forums

ASP

This topic is locked

Image Updating Problem

Posted 22 Nov 2002 05:30:09
1
has voted
22 Nov 2002 05:30:09 Paul Whitfield posted:
Hello, I have an events listing application that will ultimately be able to update content and image files stored in a folder on the server but I'm receiving this error: "Either BOF or EOF is True, or the current record has been deleted" I'm using a dynamic drop down menu to select my updateable event/image record which then opens to the actual edit forms when selected. Its from this page that I'm getting the error when I hit submit. It seems to be hitting the error once it gets to the first database field being called from the recordset. In this case: <%=(rsEditNews.Fields.Item("SUBJECT".Value)%> I've also noticed that when I take the enctype="multipart/form-data" out of the form, everything works fine expect for the image updating. Can anyone give me any suggestions on this, it would be greaty appreciated.

Thanks,
Paul

Replies

Replied 22 Nov 2002 06:19:13
22 Nov 2002 06:19:13 Dave Blohm replied:
BOFs and/or EOFs are caused by a null recordset being returned; or more simply, no recordset in your table matches the criteria you are specifying in the SQL statement.

What I do to prevent this is before calling values from my recordset, I generally do a

<%

If Not rsMyRecordset.EOF then

Do My Stuff

End If


%>

Conversly you can also do a

<%

If rsMyRecordset.EOF then

Do Something Because There is No Usable Data

End If

%>

Hope this helps.
Doc
Rangewalk Digital Studios

Edited by - on 22 Nov 2002 06:24:14
Replied 22 Nov 2002 16:12:41
22 Nov 2002 16:12:41 Paul Whitfield replied:
I tried the above tip, but the problem is that there ARE records in my table, they just arn't being returned. I can only get rid of the error when I take the enctype="multipart/form-data" out of the form. Then all content is read and updated perfectly from my recordset expect for the image file obviously. It seems like the enctype="multipart/form-data" is the main problem behind not finding my records.

Any suggestions?

Reply to this topic