Here is my code. I want LastRecord to represent the # of records in my database that meet the search criteria. Please help me finish this code.
Code:<% Dim SearchCriteria Dim cnn Dim rst Dim LastRecord Dim counter SearchCriteria = Request.Form("Criteria") Set cnn = Server.CreateObject("ADODB.Connection") Set rst = Server.CreateObject("ADODB.Recordset") cnn.Open "DSN=test" rst.Open "Select * FROM test where name = " & SearchCriteria, cnn LastRecord = ???????? for counter = 0 to LastRecord Response.write (rst("Telephone(Counter)")) Next rst.Close cnn.Close %>




Reply With Quote