Hi all

I had a listview showing Image and its description from the database. In that i hide the other fields like GroupID,productid(primary key),product. In the database i stored two product with the same GroupID. Now i want to get how many products are stored under the same GroupID. How can i get that? Help me...

Thanks in advance


Quickest way, especially as the data gets large, is to write a scalar function in SQL, and execute it.

That basically means that you write a stored procedure that returns a single value, assuming you want the count for only one group.

If you have many groups and want many counts, then you could write a standard SQL query.

You could do this in code, but the larger the dataset, the slower this will be.