Sorry if this is too much dont really know what people want to see.

<%
DIM dcnDB 'DB Connection - AS ADODB.Connection
DIM rsPERSON 'As ADODB.Connection
DIM rsCount 'As ADODB.Connection

Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.ConnectionString = "File Name=C:\localhost\tactdl.udl"
dcnDB.Open

Set rsCount = dcnDB.Execute("SELECT COUNT(LASTNAME) FROM TACT.PERSON WHERE
statuscode=4")
Response.Write "There are " & rsCount(0) & " people in AOT"

Set rsPerson = Server.CreateObject("ADODB.Recordset")
rsPerson.Open " SELECT person.lastname, " & _
"person.firstname, person.personID , " & _
"person.dob, person.gender, " & _
"a.countyname " & _
"FROM person, countylookup a " & _
"WHERE person.StatusCode = 4 " & _
"AND person.countyOfAOT = a.countyCode " & _
"ORDER BY person.lastname" , dcnDB
%>
<P>
<%
Do while not rsPERSON.EOF
Response.write "<TR><TD><a href=""adetails.asp?ID=" _
& rsPERSON("PERSONID") & """>" _
& rsPERSON("LASTNAME") & "</A></TD>" _
& "<TD> " & rsPERSON("FIRSTNAME") & "</TD>" _
& "<TD> " & rsPERSON("DOB") & "</TD>" _
& "<TD> " & rsPERSON("GENDER") & "</TD>" _
& "<TD> " & rsPERSON("COUNTYNAME") "</TD></TR>"
rsPERSON.MoveNext
Loop
rsPERSON.Close
%>