If column names contain spaces (which are not recommended), you should use square brackets such as []. For instance,[Upload Date]
Column names must follow the rules for identifiers.
From Database Identifiers
SELECT *
FROM [My Table]
WHERE [order] = 10
This is why you should use them like:
select title,[file path],[Upload Date]
Also, you do not add a parameter value anywhere in your code.
SqlCommand cmd = new SqlCommand("select title,[file path],[Upload Date] from Media where ID=@id", conn);
cmd.Parameters.AddWithValue("@id", YourIDValue);
Also use usingstatement to place your SqlConnectionand SqlCommand.
using (SqlConnection conn = new SqlConnection(YourConnectionString))
{
using (SqlCommand cmd = new SqlCommand())
{
}
}