dear friends,
i am able to get a bunch of datas from select box , but while inserting into database , only one data had been getting inserted, how to insert all the datas...
i will show the code, please give ur valuable suggestions
<%
String s1=(String)session.getAttribute("eid");
String s3[]=request.getParameterValues("language");
int i=0;
//int j=0;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:langskill");
PreparedStatement pStmt = con.prepareStatement("update lang set language=? where eid=" + s1+"");
for ( i = 0; i < s3.length; i++)
{
pStmt.setString(1, s3[i]);
pStmt.executeUpdate();
out.println(s3[i]);
}
}
catch(Exception e)
{
System.out.println(e);
}
%>
<%
if(i>0)
{
%>
<%=(String)session.getAttribute("ename")%>
datas are updated
<%
}
else
{
%>
<%=(String)session.getAttribute("ename")%>
datas are not updated
<%
}
%>