Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道这是非常愚蠢的问题。但我不像你们一样天才。如果我有如下数据集:-
adapter.fill(ds,"Login");
现在在数据集中创建的表是“登录”。现在我可以在这个表上触发一个 sql 命令,比如
sqlcommand cmd = new sqlcommand("select * from Login");
您可以过滤数据表,例如
ds.Tables["Login"].Select("ID=1 AND ID2=3"); // sample expression
更多关于这个链接
是的,你可以这样做
dataset ds=new Dataset datatable dt=ds.table[0].select(" select * from tablename") or datatable dt=ds.table["tablename"].select(" select * from tablename")