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+"'";
来做同样的事情。
相关文章:
-
2021-12-12
-
2021-06-22
-
2021-08-23
-
2022-12-23
-
2022-12-23
-
2021-07-01
-
2021-12-01
猜你喜欢
-
2021-10-15
-
2022-02-19
-
2021-10-07
-
2021-06-23
-
2021-12-01
-
2021-05-27
-
2018-03-04
相关资源
-
下载
2022-12-04
-
下载
2023-01-28
-
下载
2022-12-28