ariez88 -4 Light Poster

In this page administrator can update the records of users.he will 1st enter user's id to search the record of a particular user and then all the stored data about user like FullName, MobileNumber, CreationDate, CNIC appears in the respective textboxes.i have made two different attempts but none succeeded.
In attempt1, i thought of updating "registration" table with respect to the user's id.
In attempt2, I then thought of first deleting the record and then writing the new record for the same id.
The error in both attempts is mentioned below.
ERROR: "Syntax error (missing operator) in query expression "

Coding behind the "update" button is as follows. THANX

attempt1:
// string query4 = "UPDATE registration SET FullName,MobileNumber,CreationDate,CNIC='" + FullName.Text + "','" + MobileNumber.Text + "','" + CreationDate.Text + "','" + CNIC.Text + "' where Id='" + id_textbox.Text + "'";

attempt2:
//string query4 = "delete FullName,MobileNumber,CreationDate,CNIC from registration where Id ='" + id_textbox.Text + "'";
string query4 = "delete from registration where Id = '" + id_textbox.Text + "' ";
conn.delete(query4);

string query5 = "INSERT into registration (FullName,MobileNumber,CreationDate,CNIC,Id) values (''" + FullName.Text + "','" + MobileNumber.Text + "','" + CreationDate.Text + "','" + CNIC.Text + "','" + id_textbox.Text + "')";
conn.insert(query5);

Response.Write("<script>alert('Record Updated')</script>");

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.