I’m trying to use the RecordSet.PageSize property to display a sub-set of records but I’m getting strange results. Here’s the relevant code:
objConn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & strDBName & ";"
objRS.CacheSize=2
objRS.PageSize=1
objRS.CursorType= adUseClient
objRS.CursorType= adOpenStatic
objRS.Open strSQL, objConn
objRS.AbsolutePage = 2
Do WHILE NOT objRS.EOF
Response.write objRS("subject""<br>"
objRS.MoveNext
Loop
objRS.MoveFirst
Response.write objRS.RecordCount&"<br>"
Response.write objRS.PageSize&"<br>"
Response.write objRS.PageCount&"<br>"
Response.write objRS.AbsolutePage&"<br>"
In this case I only have 4 records and the results are:
Record 3 (of 4)
Record 2
Record 1
RecordCount = 4
PageSize= 1
PageCount=4
AbsolutePage= -1
So something is happening because it doesn’t display all four records just those from page 2 to the end and the RecordCount, PageSize and PageCount are as expected but what’s this about the AbsolutePage being –1?
Any advice warmly welcomed.
Bob Levien
objConn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & strDBName & ";"
objRS.CacheSize=2
objRS.PageSize=1
objRS.CursorType= adUseClient
objRS.CursorType= adOpenStatic
objRS.Open strSQL, objConn
objRS.AbsolutePage = 2
Do WHILE NOT objRS.EOF
Response.write objRS("subject""<br>"
objRS.MoveNext
Loop
objRS.MoveFirst
Response.write objRS.RecordCount&"<br>"
Response.write objRS.PageSize&"<br>"
Response.write objRS.PageCount&"<br>"
Response.write objRS.AbsolutePage&"<br>"
In this case I only have 4 records and the results are:
Record 3 (of 4)
Record 2
Record 1
RecordCount = 4
PageSize= 1
PageCount=4
AbsolutePage= -1
So something is happening because it doesn’t display all four records just those from page 2 to the end and the RecordCount, PageSize and PageCount are as expected but what’s this about the AbsolutePage being –1?
Any advice warmly welcomed.
Bob Levien