I have a database that has a table called exhibitors. I need to write a select statement that counts the number of records in that table and then use a Response.Write statement to display that number. Any ideas would be greatly appreciated.
wardbekker
7:26 pm on Jan 29, 2003 (gmt 0)
"Select Count(*) As TotalExhibitors From exhibitors"
Response.write oRecordset("TotalExhibitors")
(assuming you created an oRecordset that contains the result of the sql statement)
kevinj
8:39 pm on Jan 29, 2003 (gmt 0)
Thanks wardbekker. Works perfectly.
txbakers
9:06 pm on Jan 29, 2003 (gmt 0)
You can also use the oRecordset.RecordCount command if you set the cursor correctly. I don't recall the specific terms, but I set mine to all 3s and you can use the RecordCount. That way you don't need a separate query to get the count.