Also, there's a lot easier way to get the RecordCount instead of looping through the recordset:
Code:Dim rs Dim cn Dim strSQL Set rs = Server.CreateObject("ADODB.Recordset") Set conn = Server.CreateObject("ADODB.Connection") cn.Open "Provider=Microsoft.Jet.OLEDB.3.51;Data Source=http://www.st-and.ac.uk/~www_sem/economics/faculty/mlm/Players.mdb" strSQL = "SELECT * FROM Players" rs.CursorLocation = 3 'adUseClient rs.Open strSQL, cn, 3 'adOpenStatic Response.Write "<H2>There are currently " & rs.RecordCount & " playing football on" rs.Close Set rs = Nothing cn.Close Set cn = Nothing




Reply With Quote