RE: Return Search Count - 4/2/2001 17:32:00
Help!I have almost exactly the same question but can't seem to figure out how to apply these answers to my situation. I am not using the DRW, only ASP. I tried the FP_iCount method and that did not do anything. (BTW, I'm still using FP98.) This is the first part of my code: <% Dim Connect,Query,ph,total,query2 Set Connect=Server.CreateObject("ADODB.Connection") Connect.Open "ph","intranetuser","intra4fun" Query="SELECT * FROM Table1 ORDER BY Table1.[reportdate]" Set ph=Connect.Execute(Query) %> Then to display the results in a table (I'll skip the table headers): <% Dim x, bgcolor On Error Resume Next ph.MoveFirst do while Not ph.eof %> <tr <% if x = 1 then response.write "bgcolor='silver'" x=2 Else Response.write "bgcolor='white'" x=1 End if %>> <td><%=ph("reportdate")%></td> <td<a href="detail_history.asp?description=<%=ph("PHID")%>"><%=ph("Description")%></a></td> <td><%=ph("status")%></td> </tr> <% ph.MoveNext Loop %> I tried adding Query2="SELECT COUNT(*) FROM Table1 total=Connect.Execute(Query2) and then display it with <%=total%> but could get a result to display. What am I missing/doing wrong? Thanks in advance for any and all assistance!
|