Please help me I got a error:Incorrect syntax near ')'. It pointed to the update_product.ExecuteNonQuery()

        Dim update_product As SqlCommand = New SqlCommand("Update sell Set Mode_Of_Payement(Cash)='" & TextBox9.Text & "',Payement='" & TextBox6.Text & "',Balance='" & TextBox8.Text & "', Mode_Of_Payement(Cheque)='" & TextBox9.Text & "',Cheque_No='" & TextBox4.Text & "' where Bill_No='" & txtbillno.Text & "'", myConnection)
        update_product.ExecuteNonQuery()
        update_product.Cancel()

In some fields that have parameter, are those the actual name of the field in your database? Bill_No is a number type so remove the single quotes.
Here's the sample query update.

Dim sql As String = "UPDATE sample SET one_one='" & txtone.Text & "', two_two='" & txttwo.Text & "', three_three='" & txtthree.Text & "', four_four='" & txtfour.Text & "', five_five='" & txtfive.Text & "' WHERE ID=" & _theID

thank you................
Can anybody explain me why this type of error coming

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.