I am using DBtag for deleting rows from a table, here is the jsp action file
:
<%@ taglib uri="http://jakarta.apache.org/taglibs/jdbc" prefix="sql" %>
<%String deletename =request.getParameter("newname");%>
<sql:connection id="conn1">
<sql:url>jdbc:mysql://mil2wwds10:3306/test</sql:url>
<sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
</sql:connection>
<sql:statement id="stmt1" conn="conn1">
<sql:query>
delete from pcinfo where New_Name
='<sql:escapeSql><%=deletename%></sql:escapeSql>'
</sql:query>
<sql:execute/>
</sql:statement>
<sql:closeConnection conn="conn1"/>
<% response.sendRedirect("wasDeleted.jsp"); %>
It get executed without any problem, but nothing is deleted from the table.
Is the query wrong ?
Thanks
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
===========================================================================
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