
























string sqlConnection2="Select JHBM,SPBM,KCSL,CGSL,CGJS,HSJJ,DDYZD from SPCGJH_D where JHBM=' "+WebTextEdit1.Text+" ' ";
SqlConnection connection = new SqlConnection(connString);
cmdSPCGJH_D=new SqlDataAdapter(sqlConnection2,connection);
cmdSPCGJH_D.Fill(ds,"SPCGJH_D");
在sqlConnection2中我传了一个参数给where条件,这样在ds的表SPCGJH_D中就只有特定的 项目才会显示出来!
另外可以通过
ds.Tables["SPCGJH_D"].DefaultView.RowFilter="JHBM='"+WebTextEdit1.Text+"'";
来做同样的事情。
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。