User-1786411686 posted
>>I want to retrive N records from a database
You can do a "SELECT TOP N col1,col2,col3 FROM tablename".
>>I will filter records according to "class" field values.
dpends on what you mean by filtering? would you be using a where clause or do you want to get the entire recordse and fill it in a dataset and filter it out from there ? You can use a datareader too but filtering is on a row by row basis...you need to
read each row and check the values in the columns programmatically.