Syntax error (missing operator) in query expression
-
updatecom.CommandText="update test2 set name='" + textBox1.Text + "' job= '" + textBox2.Text +"' title='" + textBox3.Text + "'where id=" + textBox4.Text + "";
Ahmed hassan
-
updatecom.CommandText="update test2 set name='" + textBox1.Text + "' job= '" + textBox2.Text +"' title='" + textBox3.Text + "'where id=" + textBox4.Text + "";
Ahmed hassan
-
updatecom.CommandText="update test2 set name='" + textBox1.Text + "' job= '" + textBox2.Text +"' title='" + textBox3.Text + "'where id=" + textBox4.Text + "";
Ahmed hassan
1: instead of saying 'not working', tell us what the error is. Putting commas in to fix your SQL will obviously work. 2: read up on SQL Injection attacks, to find out how I can erase your entire database if you release this code 3: tell me you're not really using variables called textBox1, textBox2, etc. Or are you trying to write unreadable code on purpose ?
Christian Graus Driven to the arms of OSX by Vista.
-
updatecom.CommandText="update test2 set name='" + textBox1.Text + "' job= '" + textBox2.Text +"' title='" + textBox3.Text + "'where id=" + textBox4.Text + "";
Ahmed hassan