hi ....
I hava problem using jdbc with SQL.
I would like to use "LIKE" statement and preparedStatement for querying data.. and
speed...
But when I try it it goes an error...
Except using simple Statement , can I do it successful wih preparedStatement and
"LIKE" statement?...
TIA
1 - sql = "select zipcodeno, sido, gugun, dong, note1, note2 from zipcode where dong
like '%" + key + "%' " ;
2 - sql = "select zipcodeno, sido, gugun, dong, note1, note2 from zipcode where
dong = ? " ;
PreparedStatement pstmt = null;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,key.trim() );
ResultSet rs = pstmt.executeQuery();
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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