Foros del Web » Programando para Internet » ASP Clásico »

porque marca este error

Estas en el tema de porque marca este error en el foro de ASP Clásico en Foros del Web. <table border=1> <tr> <td><B>PRODUCTO</B></td> <td><B>CANTIDAD</B></td> <td><B>ID_PRODUCTO</B></td> </TR> <% if not (objRS.Eof) and not objRS.bof) then while (not objRS.Eof) %> <tr> <td></td> <td><%=objrs("total_actual")%&g t; </td> <td><%=objrs("id_producto")%&gt ...
  #1 (permalink)  
Antiguo 24/06/2002, 09:41
 
Fecha de Ingreso: mayo-2002
Mensajes: 299
Antigüedad: 23 años
Puntos: 0
porque marca este error

<table border=1>
<tr>
<td><B>PRODUCTO</B></td>
<td><B>CANTIDAD</B></td>
<td><B>ID_PRODUCTO</B></td>
</TR>
<% if not (objRS.Eof) and not objRS.bof) then
while (not objRS.Eof)
%>
<tr>
<td></td>
<td><%=objrs("total_actual")%&g t; </td>
<td><%=objrs("id_producto")%&gt ;</td>
</tr>
<%
objRS.MoveNext
wend
end if
%>

El objeto no acepta esta propiedad o método: 'Eof'

/unitec/papeleria/CONSALM2.ASP, line 32



<table border=1>
<tr>
<td>
solo se que no se nada.
el que persevera alcanza.
by sonneman</td>
</tr>
</table>
  #2 (permalink)  
Antiguo 24/06/2002, 09:51
Avatar de bakanzipp  
Fecha de Ingreso: noviembre-2001
Ubicación: santiago de shilli
Mensajes: 2.554
Antigüedad: 23 años, 5 meses
Puntos: 0
Re: porque marca este error

TE FALTA CERRAR UN APRENTESIS

if not (objRS.Eof) and not objRS.bof) then

CUAL ES LA CONSULTA QUE HACES?
  #3 (permalink)  
Antiguo 24/06/2002, 09:52
Avatar de akela  
Fecha de Ingreso: septiembre-2000
Ubicación: Frente a la compu
Mensajes: 660
Antigüedad: 24 años, 7 meses
Puntos: 2
Re: porque marca este error

porque es muy probable que no hayas abierto la conexión y por lo tanto creado el objeto recordset.

primero tendrías que establecer la conexion y después crear el objeto así:


set ObjRS = new recordset

ó

Set ObjRS = Conn.Execute( SQL )
donde Conn es la conexión a la BD y SQL una consulta en SQL
  #4 (permalink)  
Antiguo 24/06/2002, 10:13
 
Fecha de Ingreso: mayo-2002
Mensajes: 299
Antigüedad: 23 años
Puntos: 0
Re: porque marca este error

si lo tengo miren ahi les va mi codigo completo
&lt;HTML&gt;
&lt;HEAD&gt;
&lt;title&gt;Coordinacion de Asesores del C.gobernador&lt;/title&gt;
&lt;%

Set oConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
set recordset1 = Server.CreateObject(&quot;ADODB.RecordSet&quot;)
oConn.Open &quot;papeleria2&quot;



SQL = &quot;SELECT * FROM tot &quot;
objRS = oConn.execute(SQL)

%&gt;



&lt;/HEAD&gt;
&lt;BODY bgcolor=&quot;#1A5CC0&quot;&gt;




&lt;table border=1&gt;
&lt;tr&gt;
&lt;td&gt;&lt;B&gt;PRODUCTO&lt;/B&gt;&lt;/td&gt;
&lt;td&gt;&lt;B&gt;CANTIDAD&lt;/B&gt;&lt;/td&gt;
&lt;td&gt;&lt;B&gt;ID_PRODUCTO&lt;/B&gt;&lt;/td&gt;
&lt;/TR&gt;
&lt;%
if (not objRS.Eof) and (not objRS.bof) then

while (not objRS.Eof)
%&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;%=objrs(&quot;total_actual&quot;)%&g t; &lt;/td&gt;
&lt;td&gt;&lt;%=objrs(&quot;id_producto&quot;)%&gt ;&lt;/td&gt;
&lt;/tr&gt;
&lt;%
objRS.MoveNext
wend
end if
%&gt;




&lt;/BODY&gt;
&lt;/HTML&gt;

<table border=1>
<tr>
<td>
solo se que no se nada.
el que persevera alcanza.
by sonneman</td>
</tr>
</table>
  #5 (permalink)  
Antiguo 24/06/2002, 10:17
Avatar de bakanzipp  
Fecha de Ingreso: noviembre-2001
Ubicación: santiago de shilli
Mensajes: 2.554
Antigüedad: 23 años, 5 meses
Puntos: 0
Re: porque marca este error

te comiste un Set amigo

SQL = &quot;SELECT * FROM tot &quot;
objRS = oConn.execute(SQL)

SQL = &quot;SELECT * FROM tot &quot;
Set objRS = oConn.execute(SQL)
  #6 (permalink)  
Antiguo 24/06/2002, 10:19
 
Fecha de Ingreso: mayo-2002
Mensajes: 299
Antigüedad: 23 años
Puntos: 0
Re: porque marca este error

jjajajaja sabia que era algo tan simple, pero que tonto fui,, gracias amigo!!!
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 08:12.