Retroceder   Foros del Web > Programación para sitios web > ASP Clásico

Respuesta
 
Herramientas Desplegado
Antiguo 27-abr-2008, 13:33   #1 (permalink)
Cameron_2006 no se puede cailificar en este momento
 
Avatar de Cameron_2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 116
Sonrisa ADODB.Recordset error '800a0bcd'

Otra vez yo... y casi con él mismo código pero esta vez, tratando de recuperar registros de varias tablas, pero me sale el siguiente error:

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&nbsp;<strong><%=Request.Form("Palabra") %></strong>&nbsp;<br /><br />
No se ha encontrado nada con <strong><%=Request("palabra")%></strong> en la Base de Datos<br />
<%
else
'Datos del registro
%>
<h3>Categor&iacute;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&oacute;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&eacute;fono: <%=mcont.Fields("txt_telefono")%><br />
Fax:<%=mcont.Fields("txt_fax")%> <br />
Correo Electr&oacute;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>, &nbsp;Tama&ntilde;o del archivo:<%=mPdf.Fields("filesize")%>&nbsp;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
%>
Cameron_2006 está desconectado   Responder Citando
Antiguo 28-abr-2008, 03:59   #2 (permalink)
Cameron_2006 no se puede cailificar en este momento
 
Avatar de Cameron_2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 116
Re: ADODB.Recordset error '800a0bcd'

Gracias a todos los que han visto este problema, quiero comunicarles que ya está resuelto, el código quedó así, para el que le interese:

<% 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&nbsp;<strong><%=Request.Form("Palabra") %></strong>&nbsp;<br /><br />
No se ha encontrado nada con <strong><%=Request("palabra")%></strong> en la Base de Datos<br />
<%
else
'Datos del registro
%>
<h3>Categor&iacute;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&oacute;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

while not mcont.EOF
%>
Nombre contacto: <%=mcont.Fields("txt_contacto")%><br />
Tel&eacute;fono: <%=mcont.Fields("txt_telefono")%><br />
Fax:<%=mcont.Fields("txt_fax")%> <br />
Correo Electr&oacute;nico: <%=mcont.Fields("txt_correo")%><br /><br />
<%
mCont.MoveNext
wend
mCont.Close
end if
set mCont=nothing
%>

<%

'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/actividades/<%=mPdf("filename")%>" target="_blank" title="<%=mPdf("description1")%>"><%=mPdf("descrip tion1")%></a>, &nbsp;Tama&ntilde;o del archivo:<%=mPdf("filesize")%>&nbsp;KB<br>

<%
mPDF.MoveNext
loop
end if
mpdf.Close
set mpdf=nothing%>
<br /><br /> <hr noshade="noshade" size="1" /><%
mAdo.MoveNext
mAdo.Close
end if
set mAdo = nothing
end if
%>
Cameron_2006 está desconectado   Responder Citando
Antiguo 28-abr-2008, 04:01   #3 (permalink)
Cameron_2006 no se puede cailificar en este momento
 
Avatar de Cameron_2006
 
Fecha de Ingreso: diciembre-2006
Mensajes: 116
Re: ADODB.Recordset error '800a0bcd'

Solución encontrada, ver comentario anterior.
Cameron_2006 está desconectado   Responder Citando
Respuesta
No hay votos aún.


Herramientas
Desplegado

Normas de Publicación
No puedes crear nuevos temas
No puedes responder temas
No puedes subir archivos adjuntos
No puedes editar tus mensajes

BB code is Activado
Caritas están Activado
[IMG] está Activado
Código HTML está Desactivado


La Zona horaria es GMT -6. Ahora son las 14:48.


Message Board Statistics

LinkBacks Enabled by vBSEO 3.1.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93