Reputation: 601
I know this is very stupid thing to ask. But i am not as genius as you all. if i have a dataset as give below:-
adapter.fill(ds,"Login");
Now the table created in Dataset is "Login". Now can i fire a sql command over this table like
sqlcommand cmd = new sqlcommand("select * from Login");
Upvotes: 4
Views: 9475
Reputation: 1697
yes you can do it as follow
dataset ds=new Dataset
datatable dt=ds.table[0].select(" select * from tablename")
or
datatable dt=ds.table["tablename"].select(" select * from tablename")
Upvotes: 0
Reputation: 263693
you can filter the data table, eg
ds.Tables["Login"].Select("ID=1 AND ID2=3"); // sample expression
Upvotes: 8