Hi,
Can anyone see what is missing here?thanks
using (SqlConnection conn = new SqlConnection(ConnString))
{
SqlCommand cmd = new SqlCommand("GetGameForCountry", conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Country", match);
Game aGame;
try
{
conn.Open();
SqlDataReader reader = cmd.ExecuteReader();
while (reader.Read())
{
aGame = new Game(reader["ID"].ToString(), reader["Location"].ToString(), reader["DateTime"].ToString());
}
reader.Close();
}
catch
{
}
return aGame;