Forums

This topic is locked

ADODB.Recordset (0x800A0C93) with rs.moveprevious

Posted 03 Jun 2002 18:04:50
1
has voted
03 Jun 2002 18:04:50 Capuleto Smith posted:
Hi..
i´m working on a schelude project where people can book some services but in some services.. it´d not be a able to book more than 2 continous..
I´m using SQL Server and ASP.. the code is

<% while (NOT rsDisp.EOF)
rsReserva.filter = "IdCodiHor ="& rsDisp("IdCodiHor"
if rsReserva.EOF then
if NOT rsDisp.BOF then
'on error resume next
rsDisp.moveprevious
rsReserva.filter = "IdCodiHor ="& rsDisp("IdCodiHor"
if rsReserva.EOF then
rsDisp.move 2
rsReserva.filter = "IdCodiHor ="& rsDisp("IdCodiHor"
if rsReserva.EOF then
rsDisp.movenext
rsReserva.filter = "IdCodiHor ="& rsDisp("IdCodiHor"
if rsReserva.EOF then
rsDisp.move(control) %>
<tr bgcolor=<%if i Mod 2 = 1 then %>"#efefef"<% else %> "#ffffff"<% end if %>>
<td width="25" class="texto" height="15">
<input type="radio" name="idCodiHor" value="<% =rsDisp.fields("IdCodiHor" %>">
</td>
<td width="103" class="texto" height="15"><%=rsServ("NomServMed"%></td>
<td width="69" class="texto" height="15">
<div align="right"><%=rsDisp.fields("NomDiaSetm"%></div>
</td>
<td width="83" class="texto" height="15">
<div align="right"><%=rsDisp.fields("HoraIniciAsig"%>:
<%if rsDisp.fields("MinIniciAsig"=0 then %>
00
<% else %>
<%=rsDisp.fields("MinIniciAsig"%>
<% end if %>
</div>
</td>
<td width="74" class="texto" height="15">
<div align="right"><%=rsDisp.fields("HoraFiAsig"%>:
<%if rsDisp.fields("MinFiAsig"=0 then %>
00
<% else %>
<%=rsDisp.fields("MinFiAsig"%>
<% end if %>
</div>
</td>
<td width="102" class="texto" height="15">
<div align="right"><%=rsDisp.fields("DuradaServ"%> min.</div>
</td>
<td width="113" class="texto" height="15" align="right"><img src="../images/dot.gif" width="1" height="15"><%=rsDisp.fields("Persona"%></td>
<td width="11" class="texto" height="15"><img src="../images/dot.gif" width="1" height="15"></td>
</tr>
<%
end if
end if
end if
else
rsDisp.moveprevious()
rsReserva.filter = "IdCodiHor = "& rsDisp("IdCodiHor"
if rsReserva.EOF then
rsDisp.move(3)
rsReserva.filter ="IdCodiHor = "& rsDisp("IdCodiHor"
if rsReserva.EOF then
rsDisp.move(control) %>
<tr bgcolor=<%if i Mod 2 = 1 then %>"#efefef"<% else %> "#ffffff"<% end if %>>
<td width="25" class="texto" height="15">
<input type="radio" name="idCodiHor" value="<% =rsDisp.fields("IdCodiHor" %>">
</td>
<td width="103" class="texto" height="15"><%=rsServ("NomServMed"%></td>
<td width="69" class="texto" height="15">
<div align="right"><%=rsDisp.fields("NomDiaSetm"%></div>
</td>
<td width="83" class="texto" height="15">
<div align="right"><%=rsDisp.fields("HoraIniciAsig"%>:
<%if rsDisp.fields("MinIniciAsig"=0 then %>
00
<% else %>
<%=rsDisp.fields("MinIniciAsig"%>
<% end if %>
</div>
</td>
<td width="74" class="texto" height="15">
<div align="right"><%=rsDisp.fields("HoraFiAsig"%>:
<%if rsDisp.fields("MinFiAsig"=0 then %>
00
<% else %>
<%=rsDisp.fields("MinFiAsig"%>
<% end if %>
</div>
</td>
<td width="102" class="texto" height="15">
<div align="right"><%=rsDisp.fields("DuradaServ"%> min.</div>
</td>
<td width="113" class="texto" height="15" align="right"><img src="../images/dot.gif" width="1" height="15"><%=rsDisp.fields("Persona"%></td>
<td width="11" class="texto" height="15"><img src="../images/dot.gif" width="1" height="15"></td>
</tr>
<% end if
end if
end if

end if
%>

<% rsDisp.MoveNext()
i = i + 1
control = control + 1
Wend %>

and the error i´m getting every time is

<b>Error Type:
ADODB.Recordset (0x800A0C93)
Operation is not allowed in this context.</b>

Regards,
Juan..


TC

Reply to this topic