Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error while trying to view

Status
Not open for further replies.

Geof

Technical User
Apr 23, 2002
6
US
What is this error and how is it resolved, please?

Operation is not allowed when the object is closed.
It is happening on this line -

if rsp.EOF then
Response.Write &quot;<font face=arial size=1 color=white> << View Pervious Thread :</font>&quot;
else
 
You either have not opened rsp yet or you closed it before you ran this line.

Try
Code:
<% On Error Resume Next %> 'at the top of your code

[code]

if rs(&quot;SomeTableThatMustBeFilled&quot;) = &quot;&quot; then
     Response.write &quot;The thing wasnt found&quot;

Else
     if not rs.EOF and rs.BOF then
[COLOR=green]'Okay it was found continue doing whatever.. [/color]          

     Else
ErrMessage = &quot;No Records.&quot; [COLOR=green]'Only if there is no records in DB [/color]
     End IF
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top