hello every one when I'm Updating a table in access it gives syntax error in update statement can any one help how to sole this problem

vbstr = "UPDATE EmpMaster SET Name= '" & UCase(txtname.Text) & "',Address='" & Trim(UCase(txtadd.Text)) & "',TeleNo='" & txttel.Text & "',MobileNo='" & txtmob.Text & "',E-mail='" & Trim(txtemail.Text) & "',ARight='" & Trim(cmbrht.SelectedItem.ToString()) & "',Post='" & txtpst.Text & "',JoiningDate='" & Trim(txtdate.Text) & "',Salary='" & Trim(txtsal.Text) & "', Comission='" & Trim(txtcom.Text) & "' WHERE EmployeeNO = " & no.ToString & " "
con.connectionstring=""
con.open()
cmd=new Oldbcommand(vbstr,con)
cmd.ExecuteNonQuery()

please help me mail it to ...

Please read the rules before posting - http://www.daniweb.com/forums/thread78223.html

vbstr = "UPDATE [EmpMaster] SET [Name]= '" & UCase(txtname.Text) & "',[Address]='" & Trim(UCase(txtadd.Text)) & "',[TeleNo]='" & txttel.Text & "',[MobileNo]='" & txtmob.Text & "',[E-mail]='" & Trim(txtemail.Text) & "',[ARight]='" & Trim(cmbrht.SelectedItem.ToString()) & "',[Post]='" & txtpst.Text & "',[JoiningDate]='" & Trim(txtdate.Text) & "',[Salary]=" & Trim(txtsal.Text) & ", [Comission]=" & Trim(txtcom.Text) & " WHERE [EmployeeNO]= " & no.ToString 

con.connectionstring=""
con.open()
cmd=new Oldbcommand(vbstr,con)
cmd.ExecuteNonQuery()
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.