Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

captureing it inText field  RSS feed

 
vicneswaran boi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to capture data retrieved from the database and edit it. To do so i want to transfer it in to a textfield.This is the code , so where do i edit.Thank you very much.
<HTML>
<%@ page import = "java.sql.*" %>
<%@ page import = "java.util.*" %>
<HEAD>
</HEAD>
<BODY><P><H2>Confirmation of Deletion </H2>
<TABLE BORDER=1 WIDTH="700" CELLPADDING=3 CELLSPACING=1>
<TR><TD>ID</TD>
<TD>NAME</TD>
<TD>HANDPHONE NO</TD>
<TD>GROUP</TD>
</TR>
<FORM ACTION="editcomm1.jsp" METHOD="POST">
<%
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
Connection connection = DriverManager.getConnection("jdbc dbc atabase","","");
Statement statement = connection.createStatement();
int id = Integer.parseInt(request.getParameter("Id"));
ResultSet columns = statement.executeQuery("SELECT * FROM View where ID ="+ id);
while (columns.next())
{
int Id = columns.getInt("ID");
String Name = columns.getString("Name");
String CName = columns.getString("CName");
String Dimension = columns.getString("Dimension");
%>

<TR>
<TD><%=Id%></TD>
<TD><%=Name%></TD>
<TD><%=CName%></TD>
<TD><%=Dimension%></TD>
<INPUT TYPE="HIDDEN" name="Id" value=<%=id%>>
<TD><INPUT TYPE=Submit VALUE="YES"></TD></TR>
</FORM>
<FORM ACTION="Delete5.jsp" METHOD="POST">
<TD><INPUT TYPE=Submit VALUE="NO"></TD></TR>
</FORM>
<% }
columns.close(); statement.close(); connection.close();
%>
</TABLE>
</BODY>
</HTML>
 
Julian Kennedy
Ranch Hand
Posts: 823
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to change something like:

to something like:

Jules
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!