theflyingminst
03-01-2009, 04:29 PM
Hi I am using ASP with Access and I wanted to know if someone could give me their opinion on the best way to get a specified recordcount.
Basically, I want to query a column to see how many unique values there are and then put the count next to it in parentheses. Look at the code below to reference.
Set oRs=Server.CreateObject("adodb.recordset")
strSQL = "SELECT DISTINCT Column FROM Table ORDER BY Column"
oRs.Open strSQL, conn,3,3
count=oRs.recordcount
Do while not oRs.EOF
Response.Write "<OPTION VALUE = '" & oRs ("Column") & "'>"
Response.Write oRs("Column") & " (" & count & ")</Option>"
oRs.MoveNext
loop
Thank you
Basically, I want to query a column to see how many unique values there are and then put the count next to it in parentheses. Look at the code below to reference.
Set oRs=Server.CreateObject("adodb.recordset")
strSQL = "SELECT DISTINCT Column FROM Table ORDER BY Column"
oRs.Open strSQL, conn,3,3
count=oRs.recordcount
Do while not oRs.EOF
Response.Write "<OPTION VALUE = '" & oRs ("Column") & "'>"
Response.Write oRs("Column") & " (" & count & ")</Option>"
oRs.MoveNext
loop
Thank you