Results 1 to 2 of 2

Thread: Is it possible to see how many records there are in a database using asp

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Location
    tampa, fl
    Posts
    4

    Red face

    Is it possible to see how many records there are in a database using asp.. I have an access database with a field called "MessageID". I have about 50 records in that database. Some of the records have 1 for "MessageID" and the rest have 2 for "MessageID". I want to see how many records there are which has 2 for "MessageID".

    does anybody have any idea? it sounds very simple... everything else is working good.. I just cant figure this out. thanks a lot...
    renjit

  2. #2
    Hyperactive Member Kagey's Avatar
    Join Date
    Sep 2000
    Location
    The Wilderness of New Brunswick
    Posts
    294
    make your connection, then execute this:
    Code:
    strSQL = "SELECT COUNT(MessageID) as totalRecords From tblTABLENAME Where MessageID=2;"
    That will count the number of records that have a messageID of 2. make sure you change the tablename to what it is suppose to be. then reference it like:

    RECORDSETNAME("totalRecords")

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