• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

captureing it inText field

 
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
 
Create symphonies in seed and soil. For this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic