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)
listBox1.Items.Clear();
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;
tblAdap.Fill(tbl);
ETPDataset.t_USR_UsersRow[] rows2;
rows2 = (ETPDataset.t_USR_UsersRow[])tbl.Select("USR_RECORDID > 60");
foreach (ETPDataset.t_USR_UsersRow
drow in rows2)
{
listBox1.Items.Add(drow.USR_UserID);
}
This is my problem
tblAdap.Fill(tbl);
, this line of code will fetch ALL data(problem for big tables) , how can i fix it ?
-Thanks