ADODB.Recordset error '800a0e79' Operation not allowed when object is open

Asked

Viewed 415 times

-2

ADODB.Recordset error '800a0e79'

Operation not allowed when the object is open.

/intranet/portal/sistemas/MAN6/includes/inc_cmbDropSituacaoReserva.Asp, line 12

<%
sql="select id, nome from matricula_online.situacoes"
ql=sql & " order by nome"

RS.OPEN SQL, CONN

%> Select... <% bolExisteComp = false IF RS.EOF = FALSE THEN while not rs.eof if cstr(intCodReserva) = cstr(rs("id")) then strSelected = "Selected" Else strSelected = "" end if Response.write "" & rs("name") & " " & vbcrlf rs.movenext Wend END IF rs close. %>

1 answer

1

This occurred because rs was repeating itself in the code even though it is inside include. Below follows the corrected code.

<%
sql="select id, nome from matricula_online.situacoes"
ql=sql & " order by nome"

RSAUX2.OPEN SQL, CONN

%> Select... <% bolExisteComp = false IF RSAUX2.EOF = FALSE THEN while not rsaux2.eof if cstr(intCodReserva) = cstr(rsaux2("id")) then strSelected = "Selected" Else strSelected = "" end if Response.write ""& rsaux2("name") & " " & vbcrlf rsaux2.movenext Wend END IF rsaux2.close %>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.