
ADODB.Recordset error '800a0bcd'
El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual.
/sorl-pruebas/agenda/buscaagenda.asp, línea 158
El código lo paso completo e indico la línea 158 en rojo, cabe destacar que selecciona bien el registro base, pero no trae todos los contactos y los archivos adjuntos los repite, muchisimas gracias de antemano por la ayuda, he probado de todo... bueno casi todo.
<% dim strSql
dim mAdo
dim mcont
dim mPdf
set mAdo=CreateObject("ADODB.Recordset")
set mcont=CreateObject("ADODB.Recordset")
set mPdf=CreateObject("ADODB.Recordset")
dim palabra
palabra=request.form("palabra")
if request.Form("palabra")="" then
Response.write("Por favor introduzca la categoría a buscar")
else
'identifico mi conexión al servidor"
strSql="select tagenda.id_agenda, tcategoria.txt_categoria, tagenda.titulo_actividad, tagenda.fec_inicio, tagenda.fec_final, tagenda.txt_detalle, tagenda.txt_direccion, tagenda.cod_estado from tagenda, tcategoria where tagenda.cod_categoria=tcategoria.cod_categoria and tagenda.cod_estado=2 and uCase(tagenda.txt_detalle) like '%"&uCase(Request("palabra"))&"%'"
mAdo.Open strSql, mConnAcc, 1, 2
If mAdo.BOF And mAdo.EOF Then
%><br />
<a href="tareasagenda.asp" target="_self"><strong>Volver a la Agenda de Actividades(Calendario) </strong> </a><br /> <br />
Resultados obtenidos con <strong><%=Request.Form("Palabra") %></strong> <br /><br />
No se ha encontrado nada con <strong><%=Request("palabra")%></strong> en la Base de Datos<br />
<%
else
'Datos del registro
%>
<h3>Categoría: <%=mAdo.Fields("txt_categoria")%></h3><br />
<h3><%=mAdo.Fields("titulo_actividad")%></h3><br />
<%=replace (mAdo.Fields("txt_detalle"),chr(10),"<br>")%><br /><br />
Dirección:<%=mAdo("txt_direccion")%><br /><br />
Fecha inicio: <%=mAdo.Fields("fec_inicio")%> Fecha final: <%=mAdo.Fields("fec_final")%><br />
<%
'Contactos
strSql="select id_agenda, nro_correla, txt_contacto, txt_correo, txt_telefono, txt_fax from tagenda_contactos where id_agenda="& mAdo("Id_agenda")
set mcont=mConnAcc.Execute(strSql)
if not mcont.EOF then
do while not mcont.EOF
%>
Nombre contacto: <%=mcont.Fields("txt_contacto")%><br />
Teléfono: <%=mcont.Fields("txt_telefono")%><br />
Fax:<%=mcont.Fields("txt_fax")%> <br />
Correo Electrónico: <%=mcont.Fields("txt_correo")%><br /><br />
<%
'Anexos
strSql="select filename, description1, filesize from tagenda_pdf where id_agenda="& mAdo("Id_agenda")
set mPdf=mConnAcc.Execute(strSql)
if not mpdf.EOF then
do while not mpdf.EOF
%>
<a href="../documentos/premios/<%=mPdf.Fields("filename")%>" target="_blank" title="<%=mPdf.Fields("description1")%>"><%=mPdf.F ields("description1")%></a>, Tamaño del archivo:<%=mPdf.Fields("filesize")%> KB<br>
<%
mcont.MoveNext loop
end if
mcont.Close
set mcont=nothing
%>
<%
mPDF.MoveNext
loop
end if
mpdf.Close
set mpdf=nothing%>
<%
mAdo.MoveNext
mAdo.Close
end if
set mAdo = nothing
end if
%>