You can use rather PreparedStatement.
Here is (JavaDoc) examle:
PreparedStatement pstmt = con.prepareStatement("UPDATE EMPLOYEES SET SALARY
= ? WHERE ID = ?");
pstmt.setBigDecimal(1, 153833.00)
pstmt.setInt(2, 110592)
RoBo Zilka
____________
/EuroWeb a.s.
/www.euroweb.sk
/mailto:[EMAIL PROTECTED]
-----Original Message-----
From: Ferro, Tim [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 19, 2000 4:18 PM
To: [EMAIL PROTECTED]
Subject: Re: Error inserting in DataBase
use ' around string values -
stmt.executeUpdate("INSERT INTO JSP_TESTS VALUES ( " + employee_id + ",'" +
name + "')");
>
> try
> stmt.executeUpdate("INSERT INTO JSP_TESTS VALUES ( " +
> employee_id + "," +
> name + ")");
>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html
http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets