I am writing a simple method to update a record using spring jdbc the method is
@Override
public void updateEmployee(Employee e, int id) {
try {
Connection connection = DemoApplicationServiceImpl.getConnection();
Statement statement = connection.createStatement();
String update = "UPDATE salesforce.Employee__c SET First_Name__c = " + e.getFirst() + ", Last_Name__c = "
+ e.getLast() + ", Email__c = " + e.getEmail() + " WHERE Id = " + id;
System.out.println(update);
statement.executeQuery(update);
} catch (Exception ex) {
ex.printStackTrace();
}
}
It gives me an error
psqlexception column "umair" does not exist
umair is not even a column in database
Can anyone help?
Thanks