private void 安排_Load(object sender, System.EventArgs e)
{
sqlDataAdapter1.Fill (dataSet1,"Arrange");
}
private void button1_Click(object sender, System.EventArgs e) //查找
{
sqlCommand1.Parameters [0].Value =textBox1.Text +"%";
sqlCommand1.Parameters [1].Value =textBox2.Text +"%";
string str="select Subject from Arrange like Subject and ID like ID;";
sqlCommand1.CommandText =str;
sqlDataAdapter1.SelectCommand =sqlCommand1;
dataSet1.Clear ();
sqlDataAdapter1.Fill (dataSet1,"Arrange");
}
斜体部分出现如下中断错误:
未处理的“System.Data.SqlClient.SqlException”类型的异常出现在 system.data.dll 中。
哪位高手帮忙指点一下啊?谢谢!!