DbDataAdapter adapter = objFactory.CreateDataAdapter();
adapter.Fill(ds, 0, 10, "tbl");
/*
is it okay to get limited records using this method?
i.e. by filling dataset using adapter and providing min and max record limit?
I wish to do custom pagination using this method.
shall I go ahead?
what do you think?
*/
I have never done paging like that before. I would suggest using something like Linq2Sql for paging. You can use the .Paginate() method to do the paging, and it will generate the correctly T-SQL query
The issue is that you will be reading more data than you need.
The more records you have the worst.
Say you have 500 records and you are displaying 20 per request. At the first page you will be reading 20 records and displaying 20, second page you read 40 and display 20, at the last page (25) you will be reading 500 records and only displaing 20.