asp.net - Incorrect syntax near ',' while using update query -


The following is my code. I have used the class in my website. But I got "wrong syntax pass", "... anyone can tell me what is wrong with the code ..

  secure zero btnadd_Click (object sender, EventArgs e) { S1 = "updated tckt_tbl set class = '" + ddlclass.Text + "', dist =" + lbldist.Text + ", no_of_adults =" + ddladults.Text + ", no_of_senior =" + ddlsenior.Text + ", n1 = '"+ Txtn1.Text +"', '; S1 + = "n2 = '" + txtn2.Text + "', n3 = '" + txtn3.Text + "', n4 = '" + txtn4.Text + "', n5 = '" + txtn5.Text + " ', N6 =' "+ txtn6.Text +" ','; S1 + = "ag1 =" + txtag1.Text + ", ag2 =" + txtag2.Text + ", ag3 =" + txtag3.Text + ", AG4 = "+ txtag4.Text +", ag5 = "+ txtag5" text + ", ag 6 =" + tantataga 6 Text ","; S1 + = "gen1 = '" + txtgen1.Text + "', gen2 = '" + txtgen2.Text + "', gen3 = '" + txtgen3.Text + "', gen4 = '" + txtgen4.Text + " ', Gene 5 =' '+ + ttts 5. text + "', gene 6 = '" + + ttjegen 6. text + "', '; S1 + = "cn1 = '" + txtchn1.Text + "', cn2 = '" + txtchn2.Text + "', cag1 =" + txtcag1.Text + ", cag2 =" + txtcag2.Text + ", cgen1 = '"+ Txtcgen1.Text +"', cgen2 = '"+ txtcgen2.Text +"' where user-end = "+ session [" suiser "]. Toasting () + ""; Con.execQuery (S1); Response.Redirect ("tcktbook_itckt.aspx"); }    

First of all, it is to create an . I suggest that you use one instead.

To output the query, try to output s1 .

Chances are you have unbalanced quote.

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -