Fix for SQL query issue in mysql

revert-70aa11f8
kamidu 8 years ago
parent 65ed6c2f6e
commit 7212e969d8

@ -76,7 +76,7 @@ public class CommandOperationDAOImpl extends GenericOperationDAOImpl {
try {
super.deleteOperation(id);
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("DELETE DM_COMMAND_OPERATION WHERE OPERATION_ID = ?");
stmt = connection.prepareStatement("DELETE FROM DM_COMMAND_OPERATION WHERE OPERATION_ID = ?");
stmt.setInt(1, id);
stmt.executeUpdate();
} catch (SQLException e) {

@ -64,7 +64,7 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
try {
super.deleteOperation(id);
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("DELETE DM_CONFIG_OPERATION WHERE OPERATION_ID = ?") ;
stmt = connection.prepareStatement("DELETE FROM DM_CONFIG_OPERATION WHERE OPERATION_ID = ?") ;
stmt.setInt(1, id);
stmt.executeUpdate();
} catch (SQLException e) {
@ -82,7 +82,7 @@ public class ConfigOperationDAOImpl extends GenericOperationDAOImpl {
try {
super.updateOperation(operation);
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("UPDATE DM_CONFIG_OPERATION SET OPERATION_CONFIG = ? " +
stmt = connection.prepareStatement("UPDATE FROM DM_CONFIG_OPERATION SET OPERATION_CONFIG = ? " +
"WHERE OPERATION_ID = ?");
bao = new ByteArrayOutputStream();
oos = new ObjectOutputStream(bao);

@ -622,7 +622,7 @@ public class GenericOperationDAOImpl implements OperationDAO {
PreparedStatement stmt = null;
try {
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("DELETE DM_OPERATION WHERE ID = ?");
stmt = connection.prepareStatement("DELETE FROM DM_OPERATION WHERE ID = ?");
stmt.setInt(1, id);
stmt.executeUpdate();
} catch (SQLException e) {

@ -128,7 +128,7 @@ public class PolicyOperationDAOImpl extends GenericOperationDAOImpl {
try {
super.deleteOperation(operationId);
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("DELETE DM_POLICY_OPERATION WHERE OPERATION_ID=?");
stmt = connection.prepareStatement("DELETE FROM DM_POLICY_OPERATION WHERE OPERATION_ID=?");
stmt.setInt(1, operationId);
stmt.executeUpdate();
} catch (SQLException e) {

@ -129,7 +129,7 @@ public class ProfileOperationDAOImpl extends GenericOperationDAOImpl {
try {
super.deleteOperation(id);
Connection connection = OperationManagementDAOFactory.getConnection();
stmt = connection.prepareStatement("DELETE DM_PROFILE_OPERATION WHERE OPERATION_ID=?");
stmt = connection.prepareStatement("DELETE FROM DM_PROFILE_OPERATION WHERE OPERATION_ID=?");
stmt.setInt(1, id);
stmt.executeUpdate();
} catch (SQLException e) {

Loading…
Cancel
Save