hi,

i have used following prepared Statement for the update in database.

Can any one tell me that,How can i use date in following method.

I have 4 field for date as given belowBOLD shown)

I have used String in that place.

It is not working.




PreparedStatement pstatement = conn.prepareStatement(
"UPDATE sec_mast SET catg_code=?, vou_no=?, vou_date=?, vou_amt=?, due_date1=?, due_date2=?, mat_date=? where sec_no=? ");

pstatement.setInt(1,Integer.parseInt(request.getParameter("catg_code")));
pstatement.setString(2,request.getParameter("vou_no"));
pstatement.setString(3,request.getParameter("vou_date"));
pstatement.setInt(4,Integer.parseInt(request.getParameter("vou_amt")));
pstatement.setString(5,request.getParameter("due_date1"));
pstatement.setString(6,request.getParameter("due_date2"));
pstatement.setString(7,request.getParameter("mat_date"));
pstatement.setInt(8,Integer.parseInt(request.getParameter("sec_no")));


int rowCount = pstatement.executeUpdate();
conn.setAutoCommit(false);
conn.setAutoCommit(true);
}

plz help me