ASP - Pequeño error recordset

 
Vista:

Pequeño error recordset

Publicado por leicher (117 intervenciones) el 20/02/2001 11:37:01
no se por que cuando hago rs.RecordCount me devuelve -1 continuamente cuando hay registros.

Es necesario abrir el recorset como lectura o algo así?

gracias!
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Pequeño error recordset

Publicado por Edgar (6 intervenciones) el 20/02/2001 13:17:36
strSQL = "SELECT Tipo,Articulo,Epoca,Estilo,Precio,Numero FROM expresion2000 order by Numero"' Open RS

objPagingRS.Open strSQL, objPagingConn, adOpenStatic, adLockReadOnly, adCmdText

' Get the count of the pages using the given page size
iPageCount = objPagingRS.PageCount
t=objPagingRS.recordcount
' If the request page falls outside the acceptable range,
' give them the closest match (1 or max)
If iPageCurrent > iPageCount Then iPageCurrent = iPageCount
If iPageCurrent < 1 Then iPageCurrent = 1

' Check page count to prevent bombing when zero results are returned!
If iPageCount = 0 Then
Response.Write "¡No hay registros encontrados!"
Else
' Move to the selected page
objPagingRS.AbsolutePage = iPageCurrent

Espero que te ayude
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar