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

Recorrer registros

Estas en el tema de Recorrer registros en el foro de ASP Clásico en Foros del Web. Hola grupo, Quiero visualizar registro a registro y tengo un botón para saltar al siguiente registro. Pero no hay manera de guardarme en el registro ...
  #1 (permalink)  
Antiguo 23/01/2002, 13:44
 
Fecha de Ingreso: enero-2002
Ubicación: Sabadell
Mensajes: 565
Antigüedad: 23 años, 3 meses
Puntos: 4
Recorrer registros

Hola grupo,
Quiero visualizar registro a registro y tengo un botón para saltar al siguiente registro. Pero no hay manera de guardarme en el registro en que me encuentro y siempre me enseña el segundo registro.
Os escribo un poco de código:

function Display (formulario)
{
<%rs.movenext%>
formulario.nombre.value = "<%rs("nombre")%>
}

<form name=formulario>
<input type=button onclick="Display(formulario)>
</form>

Muchas gracias por vuestra ayuda :(
  #2 (permalink)  
Antiguo 23/01/2002, 13:58
 
Fecha de Ingreso: agosto-2001
Mensajes: 399
Antigüedad: 23 años, 8 meses
Puntos: 0
Re: Recorrer registros

hola, creo que es muy difícil que te resulte lo que pretendes hacer, ya que el servidor te entrega la información y posteriormente tu browser la publica, te aconsejo que si quieres hacer eso, guardes todos los registros que devuelve tu consulta SQL en variables y luego despliegues los velores de las variables, no directamente de la base de datos.

Espero que se entienda la idea ;)
  #3 (permalink)  
Antiguo 23/01/2002, 14:15
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses
Puntos: 1
Re: Recorrer registros

hola,
si no entiendo es algo asi como paginacion de 1 en 1?

creo que deberias usar algo como lo que viene aqui<a href='ir.asp?http://www.aspfacil.com/codigo/rspagina.asp' target='_blank'>http://www.aspfacil.com/codigo/rspagina....</a>

o bien utiliza la propieda AbsolutePosition del recordset para saber en que registros te encuentras o establecer en que registro estabas y con ello avanzar o retroceder

salu2 :) ;)

<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
  #4 (permalink)  
Antiguo 23/01/2002, 14:17
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses
Puntos: 1
Re: Recorrer registros

PROPERTY: Recordset::AbsolutePosition ----------------------------------------
PositionEnum = recordsetobject.AbsolutePosition
recordsetobject.AbsolutePosition = PositionEnum
long = recordsetobject.AbsolutePosition
recordsetobject.AbsolutePosition = long

The AbsolutePosition property sets or returns a long value that is the numeric position (ordinal position) of the current record in the Recordset object. The AbsolutePosition property may also return one of the PositionEnum constants. Note that you cannot set this property to any of the PositionEnum constants. This property only points to a position and should not be used to uniquely identify a record, since additions, deletions, sorts and other operations can easily rearrange the contents of a recordset.

When you set this property to a position number, you will be moved to the record at the position you have specified. In addition, the Recordset cache is reloaded. The records in the cache will now start at the numeric position in the Recordset you have specified. The total number of records that can be stored in the cache is set by the CacheSize property.

The first record is always numbered one. You can use the RecordCount property to determine the total number of records in the Recordset.

You can only use this property if it is supported by the provider. You must also be pointing to a valid record when attempting to use this property. If you are not pointing to a valid record, this property will return one of the PositionEnum constants which specify the current position of the record pointer in the Recordset. You may also need the set the CursorLocation property to adUseClient since the default for this property is adUseServer.

PositionEnum Constants

Constant Value Description
adPosBOF -2 The current record pointer is before the first record at the beginning of the file
adPosEOF -3 The current record pointer is after the last record at the end of the file
adPosUnknown -16 The

<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
  #5 (permalink)  
Antiguo 23/01/2002, 14:18
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses
Puntos: 1
Re: Recorrer registros

The Recordset is empty, the current position is unknown, or not supported by the provider

<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
  #6 (permalink)  
Antiguo 23/01/2002, 14:31
Avatar de urjose  
Fecha de Ingreso: diciembre-2001
Mensajes: 5.286
Antigüedad: 23 años, 4 meses
Puntos: 1
Re: Recorrer registros

<a href='ir.asp?http://www.aspfacil.com/articulos/040401.asp' target='_blank'>http://www.aspfacil.com/articulos/040401...</a>

salu2 ;)

<embed src="http://www.autocar.com.mx/images/logo.swf" type="application/x-shockwave-flash" width="468" height="60" play="true" wmode="transparent" menu="false" loop="true">
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 00:54.