-
problem in jsp
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 below BOLD 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks