Sufi,
Try it again and check you input. It works for me.
-Richard
<html>
<body>
<%@ taglib uri="http://jakarta.apache.org/taglibs/dbtags" prefix="sql" %>
<FORM action="/myapp/jsp/delete.jsp" method="POST">
Heading:<INPUT type="TEXT" name="heading"><BR>
<INPUT type="SUBMIT" name="Submit" value="Submit">
</FORM>
<hr>
<sql:connection id="conn1">
<sql:url>jdbc:mysql://localhost/ryee?user=ryee&password=ryee</sql:url>
<sql:driver>org.gjt.mm.mysql.Driver</sql:driver>
</sql:connection>
<%
String heading = request.getParameter("heading");
if (heading == null || "".equals(heading))
heading = " ";
%>
<%-- open a database query --%>
<sql:statement id="stmt1" conn="conn1">
<sql:query> DELETE FROM news where heading =
'<sql:escapeSql><%=heading%></sql:escapeSql>'
</sql:query>
<sql:execute/>
</sql:statement>
<%-- close a database connection --%>
<sql:closeConnection conn="conn1"/>
</body>
</html>
At 07:13 PM 9/12/01 +0000, you wrote:
>No, I don't think so, because I hard coded the query with a New_Name that
>exists in the table like :
>delete from pcinfo where New_Name ='WWMIL@DS23'
>
>And the row was deleted, I think the problem is here :
>
> delete from pcinfo where New_Name
> ='<sql:escapeSql><%=deletename%></sql:escapeSql>'
>
>ANY help will be appreciated.
>Thanks
>
>
>
>>From: horwat <[EMAIL PROTECTED]>
>>Reply-To: A mailing list about Java Server Pages specification and
>>reference <[EMAIL PROTECTED]>
>>To: [EMAIL PROTECTED]
>>Subject: Re: DBtag delete ??
>>Date: Wed, 12 Sep 2001 11:51:08 -0700
>>
>>This may be a bug. I think your question would be better answered on the
>>jakarta taglibs users mailing list:
>>
>>[EMAIL PROTECTED]
>>
>>Justy
>>
>>----- Original Message -----
>>From: "sufi malak" <[EMAIL PROTECTED]>
>>To: <[EMAIL PROTECTED]>
>>Sent: Wednesday, September 12, 2001 11:33 AM
>>Subject: DBtag delete ??
>>
>>
>> > 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
>> >
>>
>>===========================================================================
>>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
>
>
>_________________________________________________________________
>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