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 ...

Edited 6 Years Ago by __avd: Email Snipped.

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()
This question has already been answered. Start a new discussion instead.