Guest User

Untitled

a guest
Mar 5th, 2017
134
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. static void Main(string[] args)
  2. {
  3. SqlConnection con = new SqlConnection("Server=.;Database=MinionsDB;Integrated Security=true;");
  4. con.Open();
  5. using (con)
  6. {
  7. string country = Console.ReadLine();
  8. string select = $"SELECT UPPER(TownName) FROM Towns WHERE CountryName = '{country}'";
  9. SqlCommand exec = new SqlCommand(select, con);
  10. SqlDataReader printscr = exec.ExecuteReader();
  11. Console.Write("[");
  12. while(printscr.Read())
  13. {
  14. Console.Write(printscr.GetString(0));
  15. }
  16. Console.Write("]");
  17. }
  18. con.Close();
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×