Results 1 to 2 of 2

Thread: Count(*)

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    ma,usa
    Posts
    485
    Hi I need the count of the recordset and need help.Here's the idea:

    <html><head><title></title></Head><body>
    <H3>There are this many rows with this criteria: <b>open</b>.</H3>
    <%
    Dim Connect, Query
    Set Connect = Server.CreateObject("ADODB.Connection")
    Connect.Open "NewSite"
    Set Query = Connect.Execute ("Select COUNT(*) from Tracking where (Status1 = 'In Progress') or (Status1 = 'Delayed')")
    %>
    count=Query.(WHAT GOES HERE?)
    Query.Close
    set Query = nothing
    Connect.Close
    set Connect = nothing
    %>
    </body></html>


  2. #2
    Guest
    Why not change the query string to this:

    Select count(*) AS MyCount from Tracking where (Status1 = 'In Progress') or (Status1 = 'Delayed')


    And then later on, you can get the value like this:

    Count = Query.fields.item("MyCount").value

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width