Author: EduardoAndres | Posted on: 6/27/2008 5:43:02 PM | Views : 494

Greetings!
I would like to know the sintax to count the number of records that match a certain criteria from the database. For example, I have this;
// all connections
//Criteria
string MyConnString = Select * from Table1 Where UserName = '" + Page.User.Identity.Name + "'";
while (DReader.Read())
{
  int count = count + 1;
}
Is there a more efficient way that actually works correctly? My code is having some problems. By the way I'm using access.
Thanks,
Eduardo
...

Go to the complete details ...