c# - System Data SqlClient SqlException -


i have execute updating query :

 using (sqlcommand sqlcmd = new sqlcommand("update  test set testedpiece = testedpiece + 1 , rate = (testedpiece  * 100) / totalpiece  idsuperlot = @super", connexion)) 

but have error system.data.sqlclient.sqlexception (0x80131904): incorrect syntax near keyword 'and'.

i don't know why error appears , how can fix it

  1. what sql syntax error?
  2. how can fix it?

your sql command starts this:

update  test set testedpiece = testedpiece + 1 , rate = ... 

change this:

update  test set testedpiece = testedpiece + 1, rate = ... 

Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -