Author: bthumber | Posted on: 11/18/2008 1:01:10 PM | Views : 259

I need to find the count of a group of record in my database (In the code behind).  I have records like buffal%, washin% and atlant% and so on.  In my code I was go to try string myGroup = "SELECT COUNT (*) as HostNameValue FROM HostName WHERE Host='" + LIKE 'buffal%' + "'"; I'm not sure of the syntax, I'm using C#.  The method below assigns the next number in sequence.

public void CountRecords()
    {
        int count = 0;---------------------------------------------------> count always starts at zero, if I have 20 record count should start at 20 the next record is 21.
        DataTable dt = Search6HostPlaces("host");

        // visiblity is false for this label
       ...

Go to the complete details ...