Online Training Spring Hibernate Training in Delhi R Programming Training Course Big Data and Hadoop Training Java Training  
 

db

Ads

 
 

Share on Google+Share on Google+

daksesh
db
0 Answer(s)      5 years and 3 months ago
Posted in : Java Beginners
<%@ page import="java.sql.*" %>
<%@ page import="java.io.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<h2><center>TELECOM STORE INVENTORY</center></h2>

<title>Add Product</title>
<table>
    <tr>

    <td width="800"><p align ="center"></p></td>

    </tr>
</table>


<table align="center" border="3" cellpadding="7" cellspacing="2"  >

    <tr>
    <td width="220" align="center" bgcolor="#B0C4DE"><font size="5"  ><a href="main1.html">  Home  </a></font></td>
    <td width="220" align="center" bgcolor="#B0C4DE"><font size="5" color=""><a href="main2.html">  Product  </a></font></td>
    <td width="220" align="center" bgcolor="#B0C4DE"><font size="5" color=""><a href="main3.html" >  Stock  </a></font></td>
    <td width="220" align="center" bgcolor="#B0C4DE"><font size="5" color=""><a href="main4.html">  Sales Promotion  </a></font></td>

    </tr>
</table>
<h2><center></>UPDATE PRODUCT MODEL</center></h2>
</head>
<body>
<form name="update" method="post" action="Login">
<%
        String connectionURL = "jdbc:oracle:thin:@localhost:1521:XE"; 
        Connection connection = null;
        Statement statement = null;
        ResultSet rs = null;
        Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
        connection = DriverManager.getConnection(connectionURL, "system", "ora10g");
        statement = connection.createStatement();
        String QueryString = "SELECT * from producttest";
        rs = statement.executeQuery(QueryString);%>
 <table  align="center" cellpadding="10" cellspacing="10" >

<tr>
    <td>Product Model Name</td>
    <td><select name="productName">
     <%
     if (  (request.getAttribute("a") == null ))
     {
        while (rs.next())
        {
        %><option><%=rs.getString(1)%></option><%
        }}
        else
        {%>


    <option><%=request.getAttribute("a")%></option>
  <%} %>
    </select></td>
    <td><input type="submit" value="Search" name="searchproduct"></input></td>
  </tr>
  <%
        if (  (request.getAttribute("a") != null )||(request.getAttribute("b") != null ) || (request.getAttribute("c") != null ) || (request.getAttribute("d") != null)  || (request.getAttribute("e") != null ) )
        {
        %>


  <tr>
    <td>features</td>
    <th><input type="text" name="features" value=<%=request.getAttribute("b")%>></th>
  </tr>
  <tr>
    <td>Description </td>
    <th><input type="text" name="Description" value=<%=request.getAttribute("c")%>></th>
  </tr>

  <%} 
        else
        {%>

          <tr>
            <td>features</td>
            <th><input type="text" name="features"></th>
          </tr>
          <tr>
            <td>Description</td>
            <th><input type="text" name="Description"></th>
          </tr>

        <% }%>
</table>
 <center><input type="submit" value="UPDATE" name="updateproduct"></center>
</body>
Ads
View Answers
Ads









Related Tutorials/Questions & Answers:
DB connectivity - EJB
DB connectivity  DB connectivity
DB Insert
DB Insert  How to insert XML data into a database column? Column data type is CLOB
Advertisements
db connectivity
db connectivity  hi i am beginner in objective c lang and having knowlwgde of basic syntax of this lang and need statements that can be used to connect to sqlite. please do send me the simple example code. i am using GNUstep
db
db
j2me with derby db - MobileApplications
j2me with derby db  Hello, Presently Iam working on the j2me(wireless toolkit2.0).I have done so many applns in j2me,but I want to install derby db in j2me.I am new to derbydb. Can u tell me briefly abt derby db,which version
about db - Struts
About DB in Struts  I have one problem about database. i am using netbeans serveri glassfish. so which is the data source struts config file should be? Please help me
Zend Db error - WebSevices
Zend Db error  Hello friends, How i get the values from the database using zend framework Any one know the code. Help me
how to migrate java db to mysql
how to migrate java db to mysql  I have an aplication,for migrating java db to mysql db.how it will done
getting db in action class
getting db in action class  hi, Am usin struts in ma application... n i need to interact with the db .. so i used.. getDataSource(request) but it gives me an error.. java.lang.NoSuchMethodError: LoginAction.getDataSource(Ljavax
DB Schema Viewer
DB Schema Viewer       DB Schema Viewer is an Eclipse plugin that builds a graphical view of an existing database. Reverse Engineering is performed through JDBC
Server DB connection - JDBC
Server DB connection  Hello Guys I want to connect two databases at the same time but it looks like the java is only picking up the second database. One database is on my localhost and the other one is on server, I want
JSP,DB,SERVLET
JSP,DB,SERVLET  I have a jsp page with 3 text fields name,age ,city.i populated these datas into a database table.I have another jsp page with 4 fields name, city , age and phone.Once the user enter the name, city and age should
ERRor in executing DB program
ERRor in executing DB program  While executing following code an Error was generated.can any one help me for this. LiveDB liveDBObj = DataSourceFactory.getLiveDBInstance(); PreparedStatement pstmt=null; String qry=""; qry
Aggregrate function Max() in db
Aggregrate function Max() in db  Hi everyone i have a question and stuck with this problem. i have a table like Brand in mySql db where brandid(varchar) is generating automatically.. im having a Db connection class and a method
db error - Java Beginners
db error  Hi, how to insert text area content into database...://192.168.10.126/"; String db = "roseindia"; String driver = "com.mysql.jdbc.Driver...(driver); con = DriverManager.getConnection(url+db, user, pass
Version of ojb>db-ojb dependency
List of Version of ojb>db-ojb dependency
Version of be.bagofwords>count-db dependency
List of Version of be.bagofwords>count-db dependency
Version of cn.featherfly>featherfly-db dependency
List of Version of cn.featherfly>featherfly-db dependency
Version of com.celum>db-parent dependency
List of Version of com.celum>db-parent dependency
Version of com.espertech>esperio-db dependency
List of Version of com.espertech>esperio-db dependency
Version of com.fireflysource>firefly-db dependency
List of Version of com.fireflysource>firefly-db dependency
Version of com.jalalkiswani>jk-db dependency
List of Version of com.jalalkiswani>jk-db dependency
Version of com.pavelvlasov>jsel-db dependency
List of Version of com.pavelvlasov>jsel-db dependency
Version of com.pavelvlasov>pvcommons-db dependency
List of Version of com.pavelvlasov>pvcommons-db dependency
fat image from db
fat image from db   <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <% Blob image = null; Connection con = null; byte[] imgData = null ; Statement stmt
fat image from db
fat image from db   <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <% Blob image = null; Connection con = null; byte[] imgData = null ; Statement stmt
fat image from db
fat image from db   <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <% Blob image = null; Connection con = null; byte[] imgData = null ; Statement stmt
fat image from db
fat image from db   <%@ page import="java.sql.*"%> <%@ page import="java.io.*"%> <% Blob image = null; Connection con = null; byte[] imgData = null ; Statement stmt
Java and DB - Java Interview Questions
Java and DB   What is the difference between database null and Java null
JSP,DB,SERVLET
JSP,DB,SERVLET  hi thank you for your reply.With this code i can insert the data successfully into database but In ajax.jsp once i give the name;;;age and city are not automatically fetched......instead sumthing get filled