无法将类型"string"隐式转化为"system.data.sqlclient.sqlcommand"
if (!IsPostBack)
{
sqlConnection1.Open();
DataSet ds1=new DataSet();
sqlDataAdapter1.Fill(ds1,"xbxx");
xbbh.DataSource=ds1.Tables["xbxx"].DefaultView;
xbbh.DataTextField="xbmc";
xbbh.DataValueField="xbbh";
xbbh.DataBind();
sqlConnection1.Close();
}
else
{
sqlConnection1.Open();
DataSet ds2=new DataSet();
sqlDataAdapter2.SelectCommand="select * from bjxx where xbbh='"+xbbh.SelectedItem.Value+"'";
sqlDataAdapter2.Fill(ds2,"bjxx");
bjbh.DataSource=ds2.Tables["bjxx"].DefaultView;
bjbh.DataTextField="bjmc";
bjbh.DataValueField="bjbh";
bjbh.DataBind();
sqlConnection1.Close();
}
提示错误:无法将类型"string"隐式转化为"system.data.sqlclient.sqlcommand"?????