hi everyone;
I getting annoying with update statement
con.Open();
Label authorname = e.Item.FindControl("LblAuthorHandler") as Label; //When I Update 1 Column in Record Run perfectly
string cmdStrUpdatepoint = "UPDATE Registration SET uPoints +=1 WHERE UserName ='" + authorname.Text +"'";
// OR
string cmdStrUpdatepoint = "UPDATE Registration SET TimeRecievePoint ='"+DateTime.Now +"' WHERE UserName ='" + authorname.Text +"'"; //When I Combine Like this "I Got SYNTAX ERROR" //Incorrect syntax near the keyword 'SET'.
string cmdStrUpdatepoint = "UPDATE Registration SET uPoints +=1, SET TimeRecievePoint ='"+DateTime.Now +"' WHERE UserName ='" + authorname.Text +"'";
SqlCommand cmdUpdatepoint = new SqlCommand(cmdStrUpdatepoint, con);
cmdUpdatepoint.ExecuteNonQuery();
Label3.Text = "werw :"+ Session["uNew"].ToString() ;
con.Close();
thanks