I would like to edit table data row by row when click on edit button of each row.

I am using this code but it's not working please help me.....



<%@ page import="java.sql.*"%>
<%@ page import="java.util.*"%>
<%! String update,delete,edit,username,userid,designation,platform,salary;%>
<%
update=request.getParameter("update");    
delete=request.getParameter("delete"); 
edit=request.getParameter("edit");
userid=request.getParameter("userid");
username=request.getParameter("username");
designation=request.getParameter("designation");
platform=request.getParameter("platform");
salary=request.getParameter("salary");
  try
{
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection con=DriverManager.getConnection("jdbc:odbc:varnarsample");
Statement st=con.createStatement();
ResultSet rs=st.executeQuery("select * from userdetails");
%>



    

USER Data Base Update Options

<% while(rs.next()) {%> <% } %>
UserIDUsernameDesignationPlatformSalaryOptions
name="userid" readonly="true" > name="username" readonly="true" > name="designation" readonly="true" > name="platform" readonly="true"> name="salary" readonly="true" >       
<% } catch(Exception e) { e.printStackTrace(); } %>

Replies

  • Morningdot Hablu
    Morningdot Hablu
    hey you didn't give the username and password in getConnection() method byddy....
    Connection con=DriverManager.getConnection("jdbc😲dbc:varnarsample","username","password");
  • sunny3063
    sunny3063
    Thanks u very much but now am facing same problem...
  • Reya
    Reya
    @sunny: What error you get??
  • sunny3063
    sunny3063
    This program was executing properly.. But problem related to it is when i click on edit button only first rwo of the table was going to edit but the remaining rows which are existed in that table are not able to edit... This is the problem related to this program..... Please help me.... Thanks in advance..... Sunny 😕

You are reading an archived discussion.

Related Posts

Orkut (read Google) understands that letting users 'Like' other users content is the way to go ahead in the game. Inspired from Facebook's like button concept but not blatantly copying...
Dear All, I am Satyatej,completed M.Sc(Tech) Electronics & Instrumentation in July 2010 with 9.83 credits out of 10. I am also completed courses like PLC,Scada,Labview. I want to join in...
I've been thinking of changing the name of CE Reviews section to CE Gadgets (or something similar) to widen the scope of the section and also get CEans to contribute...
CEans, My personal appeal to all of you - if you like any post on CrazyEngineers, please hit the 'like' link in the bottom-right corner of the post. It serves...
if there is list L like [1,4,5,23,4,43] then what are rules or procedure required to count the element of list using recursion in prolog?