I've added a dataset , and a table adapter to my C# project.
In this query , I get table data , then filter , then I will iterate and fill a listbox.(The dataset and tableadapter was added via DataSources boxes)

            ETPDataset.t_USR_UsersDataTable tbl = (new ETPDataset.t_USR_UsersDataTable());
            ETPDatasetTableAdapters.t_USR_UsersTableAdapter tblAdap = new TestIntellisenseSql.ETPDatasetTableAdapters.t_USR_UsersTableAdapter();
            tblAdap.Connection.ConnectionString = scon.ConnectionString;
            ETPDataset.t_USR_UsersRow[] rows2;
            rows2 = (ETPDataset.t_USR_UsersRow[])tbl.Select("USR_RECORDID > 60");
             foreach (ETPDataset.t_USR_UsersRow
                drow in rows2)

This is my problem


, this line of code will fetch ALL data(problem for big tables) , how can i fix it ?

I found the answer.Here it goes.
I have to edit the query in the Dataset Designer.
The original query is

SELECT     dbo.t_USR_Users.*
FROM         dbo.t_USR_Users

but then change it to

SELECT     dbo.t_USR_Users.*
FROM         dbo.t_USR_Users
WHERE     (USR_RecordID > @ID)

Then as last step , when I query the data to return a table

tbl = tblAdap.GetData(60);//GetData method now accepts parameter
This question has already been answered. Start a new discussion instead.