string query = SELECT mo_no FROM mf_mo WHERE sta_dd = selectedDate and dep like dep; SqlCommand command = new SqlCommandquery connection; commandParametersAddWithValuesel
string query = "SELECT mo_no FROM mf_mo WHERE sta_dd = @selectedDate and dep like '%' + @dep + '%'"; SqlCommand command = new SqlCommand(query, connection); command.Parameters.AddWithValue("@selectedDate", selectedDate); command.Parameters.AddWithValue("@dep", depValue);
原文地址: https://www.cveoy.top/t/topic/iJ1K 著作权归作者所有。请勿转载和采集!