You don't have a parameter called
@name
in your SQL statement. Perhaps you wanted to select it like
SELECT Name FROM NewsClip_Login WHERE Username = @Username AND Password = @Password";
If that is what you're trying to do then you refer to the result columns wiuthout @ since that is used for parameters.
Another thing concerning the password. Never ever store the passwords as plain text. They should always be hashed one-way. Have a look at
Password Storage: How to do it.[
^]
ADDITION
-----------
string queryText = @"SELECT Name FROM NewsClip_Login WHERE Username = @Username AND Password = @Password";
using (SqlConnection cn = new SqlConnection("Data Source=PRIMO-CHALICE;Initial Catalog=NewsClip;Integrated Security=True")) {
using (SqlCommand cmd = new SqlCommand(queryText, cn))
{
cn.Open();
cmd.Parameters.AddWithValue("@Username", UsernameTextBox.Text);
cmd.Parameters.AddWithValue("@Password", PasswordTextBox.Text);
SqlDataReader reader = cmd.ExecuteReader();
reader.Read();
NameLabel.Text = reader["Name"].ToString();
NameLabelText = NameLabel.Text;
reader.Close();
...