title: MySql update statement in jdbc
body: <p>I am trying to update my database when there is a change in the inventory on the client program. The update statement ends up with the correct values in it but i get a mysql syntax error when trying to execute the update.</p>
  
  <pre><code>String sql = "UPDATE video_device SET serialNumber='" + device.getSerialNumber() + "', inventoryNumber=" + device.getInventoryNumber() + ", ownerName='" + device.getServicePerson().getName() 
                      + "', ownerTitle='" + device.getServicePerson().getJobTitle() + "', ownerEmail='" + device.getServicePerson().getEmail() + "', ownerPhoneNumber='" + device.getServicePerson().getPhoneNumber() 
                              + "', dateYear=" + device.getDateAquired().getYear() + ", dateMonth=" + device.getDateAquired().getMonth() + ", dateDay=" + device.getDateAquired().getDay() + ", typeDevice='" + device.getTypeDevice() 
                                     + "', description='" + device.getDescription() + "', price=" + device.getPrice() + ", locationBuilding='" + device.getLocation().getBuilding() + "', locationRoomNumber=" 
                                      + device.getLocation().getRoomNumber() + " WHERE serialNumber='" + orig.getSerialNumber() + "', inventoryNumber=" + orig.getInventoryNumber() + ", ownerName='" + orig.getServicePerson().getName() 
                      + "', ownerTitle='" + orig.getServicePerson().getJobTitle() + "', ownerEmail='" + orig.getServicePerson().getEmail() + "', ownerPhoneNumber='" + orig.getServicePerson().getPhoneNumber() 
                              + "', dateYear=" + orig.getDateAquired().getYear() + ", dateMonth=" + orig.getDateAquired().getMonth() + ", dateDay=" + orig.getDateAquired().getDay() + ", typeDevice='" + orig.getTypeDevice() 
                                     + "', description='" + orig.getDescription() + "', price=" + orig.getPrice() + ", locationBuilding='" + orig.getLocation().getBuilding() + "', locationRoomNumber=" 
                                      + orig.getLocation().getRoomNumber() + ";";
  </code></pre>