开发者

Read datarow from the middle of the rows 101-200 of the dataset

As i am having large dataset , to read that i am using threads. I want to read first 1-100 rows by creating new thread. and at the same time I want to read 101-200 by creating other t开发者_如何学Gohread.

I want to start both the threads at the same time.

Now the problem is how to read the dataset directly from 101-200 rows.It should directly point to 101 record.

Is there any way to do that...kindly help.

Thank you Ramesh.T.


You can use Enumerable.Skip with a DataTable.

You want records 101 - 200, so skip 100 records and get next 100 records.

IEnumerable<DataRow> rows = table.AsEnumerable().Skip(100).Take(100);


Answer will probably depend on the database used, but most have a LIMIT clause that can be used to start at result X and return Y results. So for example in mysql: select * from table LIMIT 101,100;

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜