How to UPDATE a Oracle table with JSP
1 posts in topic
Flat View  Flat View

Posted By:   Charlotte_Endresen
Posted On:   Monday, April 2, 2001 05:35 AM

I dont know how to UPDATE a table in Oracle when i'm using JSP code.
Here is what i want to do:
stmt.executeUpdate("UPDATE costumer SET Fname=('"+request.getParameter("Fname")
And i want to UPDATE the lastname as well WHERE Costumernumber = request.getParameter("Costumernumber")

Thanks boys

Re: How to UPDATE a Oracle table with JSP

Posted By:   Gopal_Kandasamy  
Posted On:   Tuesday, April 3, 2001 08:13 AM

You have to PreparedStatement to
update a table in ORACLE Database.

<% PreparedStatement pstmt = conn.prepareStatement("UPDATE EMPLOYEES SET SALARY = ? WHERE ID = ?");

pstmt.setBigDecimal(1, 153833.00)

pstmt.setInt(2, 110592);

ResultSet rset = pstmt.executeUpdate();


About | Sitemap | Contact