我用了下列语句:SqlConnection conn = new SqlConnection("Data Source=computer;Initial Catalog=test1;Integrated Security=True");
SqlCommand cmd = conn.CreateCommand(); string sql = "SELECT * FROM Table_1 WHERE se =" + this.textBox1.Text + "";
SqlDataAdapter sda = new SqlDataAdapter(sql, conn );
DataSet ds = new DataSet();
sda.Fill(ds);
不过没用,它依然显示全部表内容。它原来自动生成:this.table_1TableAdapter.Fill(this.test1DataSet.Table_1);
其中Table_1是我的表。
还请帮忙
SqlCommand cmd = conn.CreateCommand(); string sql = "SELECT * FROM Table_1 WHERE se =" + this.textBox1.Text + "";
SqlDataAdapter sda = new SqlDataAdapter(sql, conn );
DataSet ds = new DataSet();
sda.Fill(ds);
不过没用,它依然显示全部表内容。它原来自动生成:this.table_1TableAdapter.Fill(this.test1DataSet.Table_1);
其中Table_1是我的表。
还请帮忙
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货