大家帮我看看这个,
大家帮我看看这个,
try
{
sqlCommand1.Parameters[0].Value=textBox2.Text + "%";
sqlCommand1.Parameters[1].Value=textBox1.Text + "%";
string str="Select * from tzsdy";
str += "where ksh like @ksh and xm like @xm";
sqlCommand1.CommandType=CommandType.Text;
sqlCommand1.CommandText=str;
sqlDataAdapter1.SelectCommand=this.sqlCommand1;
dataSet11.Clear();
MessageBox.Show("I.m here!");
sqlDataAdapter1.Fill(dataSet11,"tzsdy");//这句通不过。
}
catch(Exception ex)
{
MessageBox.Show(ex.ToString());
}
另外 DataGrid 的 datamember 属性怎么的添不了。