Hi,
my adduser.jsp page consist of form with field username,groupid like.
I am forwarding this page to insertuser.jsp. my aim is that when I submit adduser.jsp page then the field filled in form should insert into the usertable.The insertuser.jsp is like:
String USERID=request.getParameter("id");
String NAME=request.getParameter("name");
String GROUPID=request.getParameter("group");
InitialContext context = new InitialContext();
DataSource ds = (DataSource) context.lookup("java:comp/env/jdbc/mynewdatabase");
Connection conn = ds.getConnection();
context.close();
Statement stmt=conn.createStatement();
stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE);
ResultSet rs=stmt.executeQuery("select UserId,GroupId, emailid from user");
rs.next();
rs.updateString("userId=+"id"+");
rs.updateString("GroupId=+"group"+")
rs.updateString("emailid=+"name"+");
rs.updateRow();
rs.close();
But showing error at the above red lines as:can not symbol:(method updatestring(java.lang.string))2.')' 3.';' expected.
Really Speaking I am newbie in this java world.
waiting Your valuable suggestion.
Thanks and regards
haresh