Bonjour,
je suis en train de créer une application web en asp.net. j'ai un probleme avec la requete update je ne reussi pas a modifier le contenu de ma table sql server. mon but c'est changer le mot de passe. voici le code:
SqlConnection con = new SqlConnection("Data Source=RABEB-PC;Initial Catalog=vaccination;Integrated Security=True");
String cmdStr = "Select count(*)from authentification where username='" + TextBox1.Text + "'";
SqlCommand Checkuser = new SqlCommand(cmdStr, con);
con.Open();
int temp = System.Convert.ToInt32(Checkuser.ExecuteScalar().ToString());
if (temp == 1)
{
String cmdStr1 = "Select password from authentification where username='" + TextBox1.Text + "'";
SqlCommand pass = new SqlCommand(cmdStr1, con);
String password = pass.ExecuteScalar().ToString();