SqlDataAdapter adapter = new SqlDataAdapter();
SqlCommand command = new SqlCommand(strsql,con);
command.Parameters.Add("@Company",SqlDbType.VarChar,100);
adapter.SelectCommand = command;这段代码的意思,能解释下? 谢谢
SqlCommand command = new SqlCommand(strsql,con);
command.Parameters.Add("@Company",SqlDbType.VarChar,100);
adapter.SelectCommand = command;这段代码的意思,能解释下? 谢谢
SqlCommand command = new SqlCommand(strsql,con);//执行查询对象
command.Parameters.Add("@Company",SqlDbType.VarChar,100);//添加一个参数@Company ,varchar类型,长度为100
adapter.SelectCommand = command;
//执行当前查询命令