data retrival from database throw simple jsp..

Ads
 

data retrival from database throw simple jsp..

We can retrieve the the data from data base simple jsp page:

Jsp Page:retrive.jsp

<%

            Connection conn = null;
          ResultSet rs = null;
         Statement stmt = null;
          String Query="SELECT * FROM STUD";


         try {

     Class.forName("com.ibm.db2.jcc.DB2Driver");
        conn = DriverManager.getConnection("jdbc:db2://59.145.105.55:50000/tsttrial","trialadm","trial123");
        stmt =conn.createStatement();

        rs = stmt.executeQuery(Query);
        %>

        <TABLE cellpadding="5" border="1"  style="background-color: #FGFGEE;">
        <TR>
        <TD>SELECT</TD>
        <TD>STUDENT ID</TD>
        <TD>STUDENT NAME</TD>
        <TD>STUDENT AGE</TD>
        <TD>STUDENT DEPT</TD>
        </TR>
<%
            int i=1;
while (rs.next()) {

%>

<TR>
<TD><input type="radio" value="<%=rs.getString(1)%>" name="r1" id="r1" onclick="displayResult(this.value)" ></TD>
<TD><input type="hidden"  ><%=rs.getString(1)%></TD>
<TD><input type="hidden"  ><%=rs.getString(2)%></TD>
<TD><input type="hidden"  ><%=rs.getString(3)%></TD>
<TD><input type="hidden"  ><%=rs.getString(4)%></TD>
</TR>
<%
    i++;
    } %>
<TR>

<TD colspan=1>now alter table</TD>
<TD><input type="button" id="add" value="add" onclick="doAdd()"></TD>
<TD><input type="button" id="modify" value="modify" onclick="doModify()"></TD>
<TD><input type="button"  id="delete" value="delete" onclick="doDelete()"></TD>
<TD><input type="button"  id="Cancle" value="Cancle" onClick="MM_goToURL('self','personnelTransaction');return document.MM_returnValue"></TD>
</TR>
</TABLE>
<%


     }

by using this we can do update,delete operaion using checkbox Or radio button...From G RameshNaidu

     catch (SQLException e) {
         System.out.println("Error occurred " + e);
      }
      %>
      </form>
View Answers

Ads









Related Tutorials/Questions & Answers:
data retrival from database throw simple jsp..
data retrival from database throw simple jsp..  We can retrieve the the data from data base simple jsp page: Jsp Page:retrive.jsp <...; Statement stmt = null; String Query="SELECT * FROM STUD"; try
dynamic retrival of data from mysql database to dropdownlist in jsp
dynamic retrival of data from mysql database to dropdownlist in jsp  Hello, Am having problem in my project... i want to retrive the data from mysql database to the dropdownlist in jsp. Example: 1st i want to display the list
Advertisements
java with jsp and dynamic database retrival for bar charts
java with jsp and dynamic database retrival for bar charts  Hi, I... dynamically for the table values logintime and userid from database.. can u please send me the code for this. very urgent! have to get the values dynamically from
Display Data from Database in JSP
, to show data from the database click on the link that calls another .jsp file named...;body> <h2>Data from the table 'stu_info' of database 'student'</h2... this jsp page and show all data from the table. Click on the <--back
how to get data from database into dropdownlist in jsp
tutorial go through the link JSP Get Data Into Dropdown list From Database   ...how to get data from database into dropdownlist in jsp  Can anybody tell me what is the problem in this code as i am not able to fetch the data from
JSP Get Data From Database
JSP Get Data From Database In this section we will discuss about how to get data from database using JSP. To get data from database to a JSP page we... example which lets you understand to fetch data from database in JSP
How to show data from database in textbox in jsp
How to show data from database in textbox in jsp   How to show data from database in textbox in jsp   Here is an example that retrieve the particular record from the database and display it in textbox using JSP. <
jsp programe for displaying data from database
jsp programe for displaying data from database  i am using JSP.i want to insert data into database and also want to display the things i have entered.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them
jsp programe for displaying data from database
jsp programe for displaying data from database  i am using JSP.i want to insert data into database and also want to display the things i have entered.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them
jsp programe for displaying data from database
jsp programe for displaying data from database  i am using JSP.i want to insert data into database and also want to display the things i have entered.../WebSevices/19592-retriving-data-from-sql-server-using-jsp-code-and-placing-them
displaying data retrieved from a database in a jsp page
displaying data retrieved from a database in a jsp page  the page should display username, emailid, telephone in addition to tthe tagline however... sql = "select billid, customerid, billdate, status from customerbills where
design chart takes data from database and through jsp page
design chart takes data from database and through jsp page  how can I design chart takes data from database and through in jsp page
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  //Customer Name: <select name="name"> <% try{ Class.forName...="select * from staff"; ResultSet rs=st.executeQuery(sql); while(rs.next
How to Retrieve data from database in jsp
How to Retrieve data from database in jsp In this section we will discuss about how to fetch data from database table. We will give a simple example which... is the video tutorial of "How to retrieve data from database and Display in JSP Page
how to display data from jsp file into database
how to display data from jsp file into database  this is a jsp file...+",'"+email+"')"); out.println("Data is successfully inserted into database...(); in the below example. the error is "cannot convert from java.sql.Statement
how to get data from database into dropdownlist in jsp
how to get data from database into dropdownlist in jsp  Customer Name:<select name="name"> <% try{ Class.forName...=con.createStatement(); String sql="select * from staff"; ResultSet rs
retrive data from database using jsp in struts?
retrive data from database using jsp in struts?   *search.jsp* <%@taglib uri="http://struts.apache.org/tags-html" prefix="html"%> <... searchProduct(SearchDTO sdto) { String query="select * from product
How to get the data from the database using Servlet or JSP program
How to get the data from the database using Servlet or JSP program  hello My Netizen friend has given the answer to retrieve data from the database... database using JSP Get data from database using JSP
Read data from excel file and update database using jsp
Read data from excel file and update database using jsp  read data from excel file and update database using jsp Hi, I am using a MySQL database... upload excel file and update database using JSP ? Thanks in Advance
How we delete a data of database from front end jsp page
How we delete a data of database from front end jsp page   I make a website and featch a data from data base and now i want that a delete button put... deleted from jsp page as well as from database.I used mysql and jsp. Please help me
dynamic retrivel of data from mysql database in table format at jsp
the data from database and display it as table format in jsp... For example, i have...dynamic retrivel of data from mysql database in table format at jsp  ...... At jsp, if i choose A1 from the dropdown list then the corresponding details
retrieve related data from database using jsp and mysql
retrieve related data from database using jsp and mysql  Hi sir, please give some example of jsp code for retrieving mysql database values in multiple dropdown list. if we change a value in a dropdown its related value must
How to get data from Oracle database using JSP
How to get data from Oracle database using JSP  hello i have a simple problem in jsp in the sense to get data from the database like oracle . I have... data from the database like oracle), I have created one jsp program like
retrive the data from access database to drop down list box in jsp
retrive the data from access database to drop down list box in jsp  hai, im new to jsp now im using the jsp along with access database.in table i load all the data's i need to retrive the data from database to dropdown list box
By dropdownlist retrive data from database and show in textbox in jsp.
By dropdownlist retrive data from database and show in textbox in jsp.  Hello Sir, I am doing project in jsp.I have to retrive data from database, when I select value from dropdownlist, and that data I want to show in textbox
jsp code for display of data from database and snap shot of the output
jsp code for display of data from database and snap shot of the output  i am using JSP.i want to insert data into database and also want to display... the following link: http://www.roseindia.net/jsp/displaydatafrom_database1.shtml
Data needs to be gathered in XML file from the database (MySql) using JSP
Data needs to be gathered in XML file from the database (MySql) using JSP ... data regarding particular id from the database table. Data needs to be gathered in XML file from the database (MySql) using appropriate JSP/Java Bean functions
url parameter using retrive data from database in jsp
url parameter using retrive data from database in jsp   the user can... clicks the Preview button, you have to create a dynamic jsp which should read the contents from the db based on the event id. But this jsp url should be a public
Data Retrival
Data Retrival  How to get the output With in 2 mins for more than 13 lakhs records
how to add data dynamically from database into a dropdown list in a jsp
how to add data dynamically from database into a dropdown list in a jsp  hi friends i am doing a project in jsp and oracle as my database.In my... get dynamically from the database and whenever a new person has registered his
Dynamic retrieval od data from database and display it in the table at jsp
the data from the mysql database... pls its urgent.. help me frnds....   Here is a jsp code that retrieves the data from the database and display...Dynamic retrieval od data from database and display it in the table at jsp 

Ads