Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/01/2005, 13:09
Avatar de mrgubu
mrgubu
 
Fecha de Ingreso: febrero-2002
Ubicación: Granada
Mensajes: 431
Antigüedad: 23 años, 2 meses
Puntos: 2
mover el recordset adelante y atrás

Hola. Intento almacenar en variables el id anterior y posterior a un registro, pero me da el error:

"El valor de BOF o EOF es True, o el actual registro se eliminó; la operación solicitada requiere un registro actual."

El código es:
Código:
idactual=Request.Querystring("id")
strSQL="SELECT tblFotos.* FROM tblFotos"

Set RS =Server.CreateObject("ADODB.RecordSet")
RS.Open strSQL, strCon, 3

RS.Move idactual
RS.Move (-1)
idanterior= RS("id")
RS.Move (2)
idposterior = RS("id")
'Para volver al registro inicial y seguir con el código
RS.Move idactual