please reply its urgent

it is only wokring when i only assign value to sub1 variableassign

<html>

<body>

<%@ page language="java" import="java.sql.*" %>

<%

String[] list=request.getParameterValues("list");

// String list=request.getParameter("list");

int i;

String sub1;

for(i=0;i<list.length;i++)

{

try

{

sub1=list;

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

Connection con=DriverManager.getConnection("jdbc:odbc:dsn1","","");

Statement stmt=con.createStatement();

stmt.execute("delete from mes where sub='"+sub1+"'");

out.println(sub1);

stmt.close();

con.close();

}

catch(Exception e)

{out.println(e);}

}

%>

<a href="admin.jsp">Click here</a>

</body>

</html>

[870 byte] By [AnkitBansala] at [2007-11-27 10:02:08]
# 1

Doublepost: http://forum.java.sun.com/thread.jspa?threadID=5192841

Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5192927

Like I said in your former topic: just debug it. Run the debugger or put some simple System.out.println() lines to check if the array has a length, if the array elements are not null, if the final SQL statement is correct, etcetera.

By the way, with putting pressure by shouting "please reply its urgent" you don't gain that much respect from our side. Some will refuse to reply. Urgency is *your* issue, not ours.

BalusCa at 2007-7-13 0:36:20 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
"it's urgent"What was the point in that?
georgemca at 2007-7-13 0:36:20 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...