You can use the RecordCount property on recordsets to have it return the number of records.
If the cursor type is set to either KeySet or Static recordset, the count will be accurate. If the cursor type is set to ForwardOnly or Dynamic it will return -1
It may also return -1 if the databaseprovider does not support the functionality (don't think the ODBC driver for MySql does support it).
If you set the CursorLocation of the recordset to Clientside the recordcount will return a recordcount with all 4 the cursortypes.
Try something like this:
<%
Dim objRec
Set objRec = Server.CreateObject("ADODB.Recordset")
objRec.CursorLocation = 3 ' (try setting it to 2 to see the difference !)
objRec.Open "Select * from MyTable", My_Conn
Response.Write "RecordCount = " & objRec.RecordCount
%>
Pierre
Join the Snitz WebRing