What database are you using; MySQL, SQL Server, etc?
The reason you get no paging is because this line
Code:
totalRecs = rs.RecordCount
Is returning a value less than or equal to zero; most likely -1. I believe that this is returned due to the type of cursor you are using on your data
Personally I would change your methodology slightly and start using .GetRows and enumerate the returned array instead of a recordset. The benefit of this is that you can close the connection as soon as .GetRows is called instead of waiting till you've done your looping logic. This also allows you to use the adOpenForwardOnly cursor type which is faster.
Here's a quick example:
Code:
<%
With objRS
.Source = strSQL
.ActiveConnection = objConn
.CursorType = adOpenForwardOnly
.LockType = adLockReadOnly
End With
objRS.Open ,,,, adCmdText
If Not objRS.EOF then
arrResults = objRS.GetRows
End if
objRS.Close
Set objRS = Nothing
...
If IsArray(arrResults) Then
intRecordCount = UBound(arrResults, 2) + 1
End if
%>
Give this a quick bash to see if it alleviates your problems.
Any questions just let us know