string sql "Select * from matable where categorie @CategoryName" categoriesAdapter.SelectCommand.Parameters.Add( "@CategoryName", SqlDbType.VarChar, 80).Value = "toasters";
UPDATE myTable SET champ1 ='val1' WHERE id=condtion
UPDATE myTable SET champ1 ='l'activité' WHERE id=condtion
public string RempApos(string str) { return str.Replace("'", "''"); } private void button1_Click(object sender, EventArgs e) { textBox2.Text "UPDATE myTable SET champ1 '" + RempApos(textBox1.Text) + "' WHERE id = condtion" ; }
/*public string RempApos(string str) { return str.Replace("'", "''"); }*/ private void button1_Click(object sender, EventArgs e) { string monString = textBox1.Text; textBox2.Text "UPDATE myTable SET champ1 '" + monString.Replace("'", "''") + "' WHERE id = condtion" ; }
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question