-
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
-
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")