Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string cmdText=string.Format("SELECT * FROM Customers WHERE Country='{0}'", countryName);
- SqlCommand cmd = new SqlCommand(cmdText, conn);
- SqlDataReader reader = cmd.ExecuteReader();
- while (reader.Read())
- Console.WriteLine(String.Format("Customer: {0} {1}", reader[0], reader[1]));
Add Comment
Please, Sign In to add comment