Sufi,
The code works fine on my machine.  I'd suggest verifying what exactly are
the values for the New_Name fields in your db.  You should  trim any input
values received from a form b/c of possible leading and trailing
spaces.  Why don't you see if it can do the select successfully first
before you try and delete the record?

-Richard

At 02:17 PM 9/18/01 +0000, you wrote:
>Hi, I spent long time to delete a record from a table using the taglin DBtag
>from Apache, but it does not work, I don't know what's wrong in this query :
>
>  delete from pcinfo where New_Name ='<%=request.getParameter("newname")%>'
>
>Here is the complete  code :
>
><%@ taglib uri="http://jakarta.apache.org/taglibs/jdbc"; prefix="sql" %>
><%String deletename =request.getParameter("newname");%>
><%=deletename%>
><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 ='<%=request.getParameter("newname")%>'
>  </sql:query>
>  <sql:execute/>
></sql:statement>
><sql:closeConnection conn="conn1"/>
><% response.sendRedirect("wasDeleted.jsp"); %>
>
>
>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

===========================================================================
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

Reply via email to