any one pleasse help me, really urgent

Dear friends and every one,

How to store a array of datas into database.....i am print in the next page but not able to store....

i will show you the codings, please give your valuable suggestions

<%

String s1=(String)session.getAttribute("eid");

String s3[]=request.getParameterValues("language");

int j=0;

try {

for (int i = 0; i < s3.length; i++)

{

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

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

PreparedStatement pStmt = con.prepareStatement("update lang set(language) values (?) where eid=? ");

// pStmt.setString(2, s3);

pStmt.setString(1, s1);

pStmt.execute();

}

}

catch(Exception e)

{

System.out.println(e);

}

%>

<%

if(j>0)

{

%>

datas are updated

<%

}

else

{

%>

datas are not updated

<%

}

%>

Thanxs in advance

[1043 byte] By [senthil_yogaa] at [2007-11-27 4:00:11]
# 1

Please use code tags ( select all relevant text and click the code button on top of the message window while posting ) it makes things easier for everyone.

What exactly is the problem? What exception are you getting? Please post the stack trace.

As far as I can tell, you're not setting the second placeholder in your preparedStatement and also, is your SQL query for update correct? I'm not sure about the syntax but it seems to be wrong to me.

Edit:

This is repost from here: http://forum.java.sun.com/thread.jspa?threadID=5166401&tstart=0

Message was edited by:

nogoodatcoding

nogoodatcodinga at 2007-7-12 9:04:47 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...