| | |
Why this error???Operation is not allowed when the object is closed.
Please support our ASP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
i m doing a simple timetable in timetable.asp with the following codes ,i created three links to view different levels of timetable. we got level 1 ,2 and 3. as this VIEW BY LEVEL 1 2 3
:mrgreen: so i pass the string 1 ,2 and 3.
<%
if request.QueryString("lowchar")="1" then
rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-1'" , conn ,1,2
else
if request.QueryString("lowchar")="2" then rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-2'" , conn ,1,2
else
if request.QueryString("lowchar")="3" then rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-3'" , conn ,1,2
end if
end if
end if
rno=0
while not rs2.EOF // this line show the above error
rno=rno+1
if rno mod 2=0 then
bgcolor="#ffffcc"
else
bgcolor="#ffff99"
end if
%>
Operation is not allowed when the object is closed. Do i need to define a new object? or maybe open a object? if so where n how? thank you dani webbies and especially chmonalisa, u r wonderful person.
:mrgreen: so i pass the string 1 ,2 and 3.
<%
if request.QueryString("lowchar")="1" then
rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-1'" , conn ,1,2
else
if request.QueryString("lowchar")="2" then rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-2'" , conn ,1,2
else
if request.QueryString("lowchar")="3" then rs2.Open "select time_id,day,time,subject from timetable where course_code = 'H-170-3'" , conn ,1,2
end if
end if
end if
rno=0
while not rs2.EOF // this line show the above error
rno=rno+1
if rno mod 2=0 then
bgcolor="#ffffcc"
else
bgcolor="#ffff99"
end if
%>
Operation is not allowed when the object is closed. Do i need to define a new object? or maybe open a object? if so where n how? thank you dani webbies and especially chmonalisa, u r wonderful person.
:lol: :lol: :lol: :mrgreen: :twisted: :twisted: :twisted: :twisted:
•
•
Join Date: Jun 2005
Posts: 107
Reputation:
Solved Threads: 3
You figured it out yet?
The error tells you that RS2 is not open...that mean none of your evaulations return true.
Either rewrite your code to include an "else" the no nested conditional action, or check if RS2 is open before "rs2.eof". You can do this by "rs2.state"
The error tells you that RS2 is not open...that mean none of your evaulations return true.
Either rewrite your code to include an "else" the no nested conditional action, or check if RS2 is open before "rs2.eof". You can do this by "rs2.state"
Web Developer
When something seems too good to be true...it usually is
When something seems too good to be true...it usually is
![]() |
Similar Threads
- ADODB.Recordset (0x800A0E78):Operation is not allowed when the object is closed. (ASP)
- Can return a Stored Procedure Recordset (MS SQL)
- "Operation is not allowed when the object is closed" error (ASP.NET)
Other Threads in the ASP Forum
- Previous Thread: SQL query problem with WHERE clause
- Next Thread: Import excel records into ASP database
| Thread Tools | Search this Thread |
archive asp asp.net aspandmssqlserver2005 aspandmssqlserver2005connection aspconnection connection database databaseconnection dreamweaver excel fso iis msmsql mssql2005 mssqlserver2005 mssqlserver2005andasp mssqlserverandasp opentextfile record searchbox selectoption single specfic sqlserver sqlserverconnection windows7





