I want to update the employee status as "Registered"
for the list of employee ids.. I tried with the below
code.. But update command gets hanged..
Can anyone please help me to complete this..
From
Servlet I passed the List of values to the
updateEmployeeStatus:
ArrayList<
String> empidList =new ArrayList<String>();
empidList.add("1");
empidList.add("2");
empidList.add("3");
Method in Employee Status class:
--------------------------------
public boolean updateEmployeeStatus(List<String> empIdlist)
{
String query="UPDATE EMPLOYEE SET STATUS='Registered'
WHERE EMP_ID IN(:empids);
Employee e=new Employee();
e.setEmpIDList(empIdlist);
Map<String,Object> params=new HahMap<String,Object>();
params.put("empids",e.getEmpIDList); ------------> Passing employee ids to the IN clause...
int count=getNamedParameterJdbcTemplate().update
(query,params); ----------> gets hanged..
}