Hi guys, i want to call a data from a database.. here is my code
string selectuser = "Dior";
string dbconnection = Application.StartupPath + "\\Database1.mdf";
SqlConnection conn = new SqlConnection(dbconnection);
conn.Open();
SqlCommand command = new SqlCommand("select username, nick from [user] where username=@user", conn);
command.Parameters.AddWithValue("username", selectuser);
SqlDataReader reader = command.ExecuteReader();
the thing is, i want to call a nick where the username is = select user.. Can you help me?