RANGE_PAGING LAST RECORD IN JSP PAGE

Hi.
I'm working in JDeveloper 10g, and I would like to know what should be the behavior for the Last button on a jsp page when I use the method setAccessMode with RANGE_PAGING mode?, I mean, when I press that button in my jsp page it doesn't go to the last record result of the query.
Thanks in advance.

Thanks for your help.
My range size is 10.
But I have a question, vo.last does the same that the last button (navigation bar) on a jsp page?
For example, if I have navigated through 50 records (with nextSet button) and I press last button, and I know that the query result in the view object is 1000 records, but I'm using RANGE_PAGING, how can I go to the last record?
Because I tried with last button, but it goes to other record different to the last one.
Thanks in advance.

Similar Messages

  • Not enough space to print the last record on each page

    Hello,
    My report looks like a simple list table, with the first row as the column header, followed by rows of records.
    The fields are placed on the Detail section and they're set with "Can Grow" property. That means, records may have different row height, some may take 1 row per record, some may take 3 rows per record, depending on the data length. I use some vertical lines on the Detail section as the column seperators, and a horizontal line as the record seperator.
    I've a Page Footer to show the page number and print date.
    My problem is:
    When the space of the last record on the current page isn't big enough, the record will be printed automatically on the second page, which is fine. But the vertical seperation lines are still displayed even though the details are printed on the second page. I got some "empty rows with vertical seperation lines" or I'd say an open-end table at the end of some pages then.
    Is there a way to avoid this?
    Your help is much appreciated. Thank you.
    Agnes

    You could draw an outline box from page header to page footer, then your internal lines would run from page header to page footer
    so if the document extends to 2 pages, the page footer will print on the 1st page and therefore the bottom line of the box
    only problem now would be that on the 2nd page the box will extend to the bottom of that page also, even if there is only 1 record

  • How to handle more records in jsp page

    i have some 1000 records in an collection( arraylist or iterator or any collection object) , for examples query returns records to me with resultset.
    i want to display 50 records each time per page
    how to display them and how to control the flow.
    plz give me any codes if possible...
    thanks all
    Message was edited by:
    BURAK
    Message was edited by:
    BURAK

    sorry I can't understand you, can you please explain it or post here any codes about it?

  • How do i display every 10 Records in my JSP page??

    Hi..
    I have developed one web-page which shows ALL employee records fetched from a employee table and display them in my JSP page.
    It has contain more than 1000's of records. I need to display first 10 Records in my page. There should be some 4 links below the records display which get me to see next 10 records or previous 10 records or first 10 records or Last 10 records.
    IS it possible in JSP??
    This is my sample code for your ref:
    <jsp:useBean id="empOperation" class="com.venki.gen.EmployeeOperation" />
    <html>
    <head>
         <title>Stardeveloper : DataAccess JSP Tag</title>
         <style>
         p, td { font-family:Tahoma,Sans-Serif; font-size:8pt;
              padding-left:15; }
         </style>
    </head>
    <body>
    <p align="center"><u>DataAccess JSP Tag</u></p>
    <%
         EmployeeList empList[] = null;
         empList = empOperation.getEmployees(empName);
    %>
    <table align="center" border="0" width="90%" cellspacing="2" cellpadding="2">
    <tr bgcolor="#CCDDEE">
         <td>EMPNO</td>
         <td>EMP Name</td>
         <td>DESIGNATION</td>
    </tr>
    <%if(empList!=null)
         for(int i=0; i<empList.length; i++)
          EmployeeList emp = empList;%>
         <tr bgcolor="#F7F7F7">
         <td><%= emp.getEmpNo() %></td>
         <td><%= emp.getEmpName() %></td>
         <td><%= emp.getEmpDesignation()%></td>
         </tr>
         <% }%>
    </table>
    </body>
    </html>
    It would be extremely useful,if i know the technique how to display every 10 Records thru JSP.
    Waiting for You people valuable reply and code!
    Regards
    venki

    I do it by pages. i.e. http://example.com/page.jsp?page=1 would show records 1-10, ?page=2 would show records 11-20
    let's pretend each record is identified by one field in the database, `id`
    then the SQL query you'd use to grab the records could be..
    SELECT * FROM `your_table` WHERE `id` >= (page*10) and <= (page*10+10)or this might even work:
    SELECT * FROM `your_table` ORDER BY `id` ASC LIMIT (page*10),10(all examples untested as I'm at work :P)

  • I want to show records on multiple pages in jsp

    hi,
    i am taking records from database through resultset.resultset contains so many records ,i want to show those records page by page on JSP.when user clicks on "next" button then next records should be displayed on JSP page.What should be the solution?
    Thanks.

    Hi
    Surely paging would be better solution for same problem. Here I am attaching some sample code. Just edit as per your requirement so go through that
         if(totalPages>10)
              int nextSkip=end>=totalPages ? 0 : end+1;
              int prevSkip=start==1 ? 0 : start-10;
              if(prevSkip!=0)
                   if(js)
                        prevLink="<a href=\""+linkPage+""+prevSkip+")\" class=\"bgWhiteABlacksmallU\"><Previous</a>";
                        firstLink="<a href=\""+linkPage+"1)\""+" class=\"bgWhiteABlacksmallU\"><<</a>";
                   else
                        prevLink="<a href=\"../"+linkPage+"skip="+prevSkip+"\" class=\"bgWhiteABlacksmallU\"><Previous</a>";
                        firstLink="<a href=\"../"+linkPage+"skip=1\" class=\"bgWhiteABlacksmallU\"><<</a>";
              else
                   prevLink="<span class=\"bgWhiteABlack\"><Previous</span>";
                   firstLink="<span class=\"bgWhiteABlack\"><<</span>";
              if(nextSkip!=0)
                   if(js)
                        nextLink="<a href=\""+linkPage+""+nextSkip+")\" class=\"bgWhiteABlacksmallU\">Next></a>";
                        lastLink="<a href=\""+linkPage+"" + totalPages + ")\" class=\"bgWhiteABlacksmallU\">>></a>";
                   else
                        nextLink="<a href=\"../"+linkPage+"skip="+nextSkip+"\" class=\"bgWhiteABlacksmallU\">Next></a>";
                        lastLink="<a href=\"../"+linkPage+"skip="+totalPages+"\" class=\"bgWhiteABlacksmallU\">>></a>";
              else
                   nextLink="<span class=\"bgWhiteABlack\">Next></span>";
                   lastLink="<span class=\"bgWhiteABlack\">>></span>";
         String completeLink=firstLink+"��"+prevLink;
         completeLink=completeLink+"������"+pageLinks;
         completeLink=completeLink+"������"+nextLink;
         completeLink=completeLink+"��"+lastLink;
         //Set the required attributes for the calling page as this page is included using jsp:include action
         request.setAttribute("pageRecords",pageRecords);//helps displaying the records of the current page
         request.setAttribute("pageLinks",pageLinks);//provides links to the other pages
         request.setAttribute("nextLink",nextLink);//provides link to the next 10 pages
         request.setAttribute("prevLink",prevLink);//provides link to the previous 10 pages
         request.setAttribute("firstRecordPosition",new Integer(firstRecordPosition));//gives the position of the first record in the list
         request.setAttribute("lastRecordPosition",new Integer(lastRecordPosition));//gives the position of the last record in the list
         request.setAttribute("recordSize",new Integer(records.size()));//gives the size of the list
         request.setAttribute("currentPage",new Integer(currentPage));//provides the skip parameter
         request.setAttribute("rowSize", new Integer(rowSize));//provides the rowsize value for the subsequent pages
         request.setAttribute("firstLink",firstLink);//provides link to the first page of the list
         request.setAttribute("lastLink",lastLink);//provides link to the last page of the list
         request.setAttribute("completeLink",completeLink);//complete link with first, previous,pageLinks,next and last links
         String recordStatus = "";
         if(recordSize==0){
              recordStatus ="No Records Found";
         }else{
              recordStatus = firstRecordPosition + " to " + lastRecordPosition + " Record(s) of " + recordSize;
         recordStatus= "<span class=\"bgWhiteABlackb\">" + recordStatus +"</span>";
         request.setAttribute("recordStatus", recordStatus);

  • I want to display many records in the same jsp page

    Hi,
    i want to display many records with in the same jsp page providing the next,previous,first last .
    give me clear idea how to do that one
    note :only using servlets,jsp,jdbc and javascript

    I believe that this is the fourth time this question has been asked by the same person
    http://forum.java.sun.com/thread.jspa?threadID=720977&messageID=4159465#4159465
    http://forum.java.sun.com/thread.jspa?threadID=720945&messageID=4159338#4159338
    http://forum.java.sun.com/thread.jspa?threadID=720919&tstart=0

  • Page through Records in JSP (URGENT)

    Hello Friends,
    If anyone can solve my problem, I am creating a sales report based on region. Now, here I have used paging for more records. The problem is:
    Say on Page 1 I have some calculation and the total of that page is 4000
    On Page 2 the total calculation of the page is 8000 and so on..........
    Now on the last page I want the grand total of all the pages.
    Can anyone let me know how to do this..........................Note: I am doing dynamic paging, i.e The query to fetch the record is executed page wize in the sense, for every page.

    I can give you a vague idea on this issue:
    Before i give my idea,i assume that when you are calling the next page or next button you are submitting the form, and in the form action you are calling the second jsp page.
    For example: Assume that i have 10 jsp pages to display
    i have 2 buttons called next and previous.
    now for every button click i do like this:
    if page 1 's next button is clicked then i will submit page1 and in the action of page 1 i will call page2.
    I hope you understood till now.
    And in the page2 jsp i will call whatever classes or do what ever i want to display page2.This is done in the scriplets in the beginning.
    I assume that you are doing in this way.If this is the case, then ur problem can be solved like this.
    For every page i will have 2 hidden variables called dbPageTotal,dbTotal.
    so let us see the senario:
    page1 : dbPageTotal=2000
    dbTotal=2000
    page2: dbPageTotal=4000
    dbTotal=4000+2000=6000
    page3 : dbpageTotal=1000
    dbTotal=6000+1000=7000
    (You need to write a little java script to assign the values to the variable)
    now suppose we are moving from page 1 to page2 :
    you can request that dbTotal with the help: request.getParameter("dbTotal") and you will have yoour value on that page.
    you also need to check what type of button he clicked.
    i hope u understood my point.
    If you are not doing in this way, and calling some servlet each time let me know, i will also think of in this issue.

  • How to retrieve records from a database and display it in a jsp page.Help!!

    Hello everyone ! im very new to this forum.Please help me to solve my problem
    First i ll explain what is my requirement or needed.
    Actually in my web page i have text box to enter start date and end date
    and one list box to select the month .If user select or enter the dates in text box
    accordingly the data from ms access database has to display in a jsp page.
    Im using jsp and beans.
    I tried returning ResultSet from bean but i get nothing display in my web page
    instead it goes to error page (ErrorPage.jsp) which i handle in the jsp.
    I tried many things but nothing work out please help me to attain a perfect
    solution. I tried with my bean individually to check whether the result set has
    values but i got NullPointerException . But the values which i passed or
    available in the database.
    I dint get any reply for my last post please reply atleast to this.
    i get the date in the jsp page is by this way
    int Year=Integer.parseInt(request.getParameter("year"));
    int Month=Integer.parseInt(request.getParameter("month"));
    int Day=Integer.parseInt(request.getParameter("day"));
    String startdate=Day+"/"+Month+"/"+Year;
    int Year1=Integer.parseInt(request.getParameter("year1"));
    int Month1=Integer.parseInt(request.getParameter("month1"));
    int Day1=Integer.parseInt(request.getParameter("day1"));
    String enddate=Day1+"/"+Month1+"/"+Year1;But this to check my bean whether it return any result!
    public void databaseConnection(String MTName,String startDate,String endDate)
    try
             java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
            java.sql.Date sqlFromDate=new java.sql.Date(fromDate.getTime());
            java.sql.Date sqlTillDate=new java.sql.Date(tillDate.getTime());
              String query1="select MTName,Date,MTLineCount from Main where MTName='"+MTName+"'  and Date between '"+sqlFromDate+"' and '"+sqlTillDate+"' " ;
            System.out.println(query1);
              Class.forName(driver);
             DriverManager.getConnection(url);
             preparedStatement=connection.prepareStatement(query1);
             preparedStatement.setString(1,"MTName");
              preparedStatement.setDate(2,sqlFromDate);
              preparedStatement.setDate(3,sqlTillDate);
              resultSet=preparedStatement.executeQuery();           
               while(resultSet.next())
                        System.out.println(resultSet.getString(1));
                        System.out.println(resultSet.getDate(2));
                        System.out.println(resultSet.getInt(3));
            catch (Exception e)
             e.printStackTrace();
    I Passed value from my main method is like thisl
    databaseConnection("prasu","1/12/2005","31/12/2005");Please provide solutions or provide some sample codes!
    Help!
    Thanks in advance for replies

    Thanks for ur reply Mr.Rajasekhar
    I tried as u said,
    i tried without converting to sql date ,but still i din't get any results
    java.text.SimpleDateFormat dateFormat=new java.text.SimpleDateFormat("dd/MM/yyyy");
             java.util.Date fromDate=dateFormat.parse(startDate);
            java.util.Date tillDate=dateFormat.parse(endDate);          
              String query1="select MTName,Date,MTLineCount from linecountdetails where mtname='"+MTName+"'  and Date >='"+fromDate+"' and Date <='"+tillDate+"' " ;
            System.out.println(query1);
    //From main method
    databaseConnection("prasu","1/12/2005","31/12/2005");I got the output as
    ---------- java ----------
    select MTName,Date,MTLineCount from linecountdetails where mtname='prasu'  and Date >='Thu Dec 01 00:00:00 GMT+05:30 2005' and Date <='Sat Dec 31 00:00:00 GMT+05:30 2005'
    java.lang.NullPointerException
    null
    null
    java.lang.NullPointerException
    Output completed (4 sec consumed) - Normal TerminationThanks
    Prasanna.B

  • How can i insert more than one record a time in a JSP page?

    Hi experts,
    I'm working with JDeveloper version 3.2 application server 9i.
    I want to insert more than 1 record using a jsp page and then perform a commit at the end.
    do you can help me with this problem/challenge?
    Thank you,
    Regards,
    Mario

    statement.executeBatch() maybe?

  • To search a record from the table by providing a search button in JSP page

    Hi,
    My problem statement is:
    I have a jsp page which displays a table containing records. I have to provide a button called search and a condition in a textfield so that the record which matches the condition gets highlighted.
    Can anyone solve my problem statement. Its urgent.
    Suraj.

    Example:
    on the jsp page, read the matched value the server provides and use it to put the statement in bold using the <b> tag (I dont know the syntax for highlighting).
    <%String matchedString=(String) request.getAttribute("matchingString");%>
    Then in your list:
    <%if(matchedString.compareTo(thisRecordString)==0){%>
    <b>
    <%}%>
    //your text goes here
    <%if(matchedString.compareTo(thisRecordString)==0){%>
    </b>
    <%}%>

  • Reg dynamically displaying records from database into a jsp page

    I am working in a project which is using struts and hibernate.In a class I gave code for retrieving data from a table and I put it in a list.
    List retrieveList;
    public List getRetrieveList() {
    String SQL_QUERY ="from student s";
    Query query = session.createQuery(SQL_QUERY);
    retrieveList = query.list();
    return retrieveList;
    public void setRetrieveList(List retrieveList) {
    this.retrieveList = retrieveList;
    And this list value I want to be displayed in a jsp page.What I have given is :
    <jsp:useBean id="records" class="StudentImpl" scope="session" />
    <bean:define id="list" name="records" property="retrieveList" />
    <table align="center" bordercolor="black" cellpadding="10" cellspacing="10">
    <logic:iterate id="data" name="list" type="pojo.student" indexId="index">
    <tr>
    <td><html:multibox property="checked" value=""></html:multibox></td>
    <td><bean:write name="data" property="studentname" /></td>
    <td><bean:write name="data" property="age" /></td>
    </tr>
    </logic:iterate>
    </table>
    When I run my jsp page its showing an error
    org.apache.jasper.JasperException: [Ljava.lang.Object; cannot be cast to pojo.Student
    can anyone resolve this problem?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    ya i got through criteria query.
    Transaction tx = session.beginTransaction();
              try{
                   Criteria query = session.createCriteria(Student.class);
                   list = (ArrayList)query.list();
                   tx.commit();
                   setRetrieveList(list);
                   session.close();
              catch(Exception e){
                   System.out.println(e);
              }

  • Click on jsp page Display records on another html page

    Hi All,
    I am new in jsp. I am making discussion forum. I have one jsp page "Post.jsp" I want when I clicked on submit button on jsp page all records display on html page "index.html". Plz. help me.
    Raj

    I have a html page (index.jsp) and a jsp pages (post.jsp) in Post.jsp page three fields: Id, Sub, message and submit button.
    I want when i click on submit button of post.jsp page then store in database and display these records on index.html.

  • Displaying DB records in JSP, same as a Search Result page

    Dear All,
    I need to design a JSP page with data from my database, similar to a search result page. Once selected, I need to pass a parameter value to call the detail page, same as a search result page.
    What is the proper way doing this in JSP please?

    I got answer fot this.
    1 pagination can give Display solution
    2 parameter passing (or variable), using sendReDirect()

  • Post and Get value in jsp page

    I have two pages
    1. Occasion.jsp
    2. Occasionsdetail.jsp
    i select values from database in occasion for example
    a
    b
    c
    they become links when i click on one of these links it call Occasiondetail form. Where i want to display details of that particular record
    On occasion page i am passing value which is displaying in last of address bar of occasionsdetail page
    How can i use that value in occasiondetail form
    both files code is pasted
    Occasions.jsp
    <head>
    <title>
    Riphah International University
    </title>
    </head>
    <body bgcolor="#ffffff">
    <form method="POST" action="occasionDetails.jsp">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td align="center" bgcolor="#6633FF"> <strong><font color="#000000">Occasions</font></strong> </td>
    </tr>
    <% org.riu.db.utility.DBHandler dbHandler = new org.riu.db.utility.DBHandler();
    if ( dbHandler.getConnection() ) {
    org.riu.db.datastructureaccess.OccasionAccess occasionAccess = new org.riu.db.datastructureaccess.OccasionAccess(dbHandler);
    java.util.ArrayList occasions = occasionAccess.getOccasions();
    if ( occasions == null || occasions.isEmpty() ) { %>
    <tr>
    <td align="center">
    </td>
    </tr>
    <% } else {
    for ( int i = 0; i < occasions.size(); i++ ) {
    org.riu.db.datastructure.Occasion occasion = (org.riu.db.datastructure.Occasion) occasions.get(i); %>
    <tr>
    <td align="center">
    <a href="occasionDetails.jsp?OccasionID <%=occasion.getOccasionID() %> "><%= occasion.getName() %></a> <%= " on " + occasion.getDate() %><%= + occasion.getSemesterID()%>
    </td>
    </tr>
    <tr>
    <td align="center">
    <hr />
    </td>
    </tr>
    <% }
    } %>
    </table>
    <p align="center">Back</p>
    </form>
    </body>
    </html>
    OccasionDetail.jsp
    <head>
    <title>
    Riphah International University
    </title>
    </head>
    <body bgcolor="#ffffff">
    <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
    <td align="center" bgcolor="#6633FF"> <strong><font color="#000000">Occasion Details</font></strong> </td>
    </tr>
    <% org.riu.db.utility.DBHandler dbHandler = new org.riu.db.utility.DBHandler();
    if ( dbHandler.getConnection() ) {
    org.riu.db.datastructureaccess.OccasionAccess occasionAccess = new org.riu.db.datastructureaccess.OccasionAccess(dbHandler);
    java.util.ArrayList occasions = occasionAccess.getOccasionswhere(I want to use that value here);
    // new Integer(request.getParameter("OccasionID")).intValue();
    if ( occasions == null || occasions.isEmpty() ) { %>
    <tr>
    <td align="center">
    </td>
    </tr>
    <% } else {
    for ( int i = 0; i < occasions.size(); i++ ) {
    org.riu.db.datastructure.Occasion occasion = (org.riu.db.datastructure.Occasion) occasions.get(i);%>
    <tr>
    <td align="center">
    Venue: <%= occasion.getVenue()%>
    </td>
    </tr>
    <tr>
    <td align="center">
    Time: <%= occasion.getTime() %>
    </td>
    </tr>
    <tr>
    <td align="center">
    <hr />
    </td>
    </tr>
    <% }
    } %>
    </table>
    <p align="center">Back</p>
    </body>
    </html>

    Are your records javascript variables? If so, you can use a json formatter to serialize the records to a string and send it from PageA to PageB using mechanism that supports strings (i.e. query parameter, cookie, etc).
    You can learn more about json at http://www.json.org/ and about a json serializer/parser at http://www.json.org/js.html .

  • How to get the value in one JSP page to another?

    Hi,
    I have problems in passing the value around in JSP. I have two JSP pages as below:
    test1.jsp
    I try to get the vaule from my textbox by using:
    String strUser = request.getParameter ("strUserName");
    Then i print out by using: out.print(strUser); then i can get the value and put on my page (For example, i get ABC on my page).
    test2.jsp
    Next, i want to get the value from strUser (which mean that the one i already display on page in test1.jsp, ABC) to insert into my table by using INSERT INTO statement. Then i try by using
    String strUser1 = request.getParameter ("strUser");
    Is it possbile for me to do that? I cannot get anything to insert into my table. Then i tried out.print(strUser1); then i found that i get NULL value.
    Could you please give me some guidance?
    Thanks you very much for any advise you may give me.
    Kimsan

    Hi,
    Thank you very much for your help. It's working fine if i just get a one value to another page, however, i have problem while i pass the value in my loop to another page because i always get the last record. I try with the following code:
    logged_page.jsp
    <html>
    <head>
    <title>Welcome to the online Auction...</title></head>
    <body>
    <%@ page language ="java" import = "java.io.*, java.lang.*, java.sql.*" %>
    <% try
         String strUsername = request.getParameter("username");
         session.setAttribute("myUserName", strUsername);     
         String strPassword = request.getParameter("password");
         Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
         String strSQL = "SELECT [UserName], [Password] FROM tblUserDetails where [UserName] = ? and [Password] = ?";
         PreparedStatement statement = myConn.prepareStatement(strSQL);
         statement.setString(1, strUsername);
         statement.setString(2, strPassword);
         ResultSet myResult = statement.executeQuery();
         if(myResult.next())
         //out.println("Login Succesful! A record with the given user name and password exists");
         out.print("<center><h1>");
         out.print("Welcome  ");
         out.print(strUsername);
         out.print("</h1></center>");
         out.print("<center>");
         out.print("<BR><BR>");
         out.print("<font font face = Viner Hand ITC size= 5>Products on sales</font>");
         out.print("<BR><BR>");
         Statement myStatement = myConn.createStatement ();
         ResultSet myResult1 = myStatement.executeQuery("SELECT * FROM tblProduct");
         ResultSetMetaData myResultSet = myResult1.getMetaData();
         out.println("<font face=Tahoma>");
         out.print("<table border=1 CELLSPACING=0>");
         out.print("<TR>");
         out.print("<TD width = 200> Item Title");out.print("</TD>");
         out.print("<TD width = 200> Description");out.print("</TD>");
         out.print("<TD width = 200> Current bid");out.print("</TD>");
         out.print("<TD width = 200> Available Time");out.print("</TD>");
         out.print("<TD width = 200> Place Bid");out.print("</TD>");
         out.print("</TR>");
         out.print("</table>");
         while(myResult1.next())
              String strProName = myResult1.getString(1);
              session.setAttribute("myProName", strProName);          
              out.print("<table border=1 CELLSPACING=0>");
              out.print("<TR>");
              out.print("<TD width = 200>");
              out.println(strProName);
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(3));
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(2));
              out.print("</TD>");
              out.print("<TD width = 200>");
              out.println(myResult1.getString(4));
         out.print("</TD>");
         out.print("<TD>");
              out.print("<form action=bid_page.jsp method=post>");
              out.print("<input type=text name=place_bid>");
              out.print("<input type=submit name=okfunc value=Bid>");
              out.print("</TD>");
              out.print("</form>");
              out.print("</TR>");
              out.print("</table>");
              out.println("</font>");
              out.print("</center>");          
         else
              out.print("<center>");
              out.print("Sorry ");
              out.print("<font color = RED size = 5>");
              out.print(strUsername);
              out.print("</font>");
              out.print(" could not be found.");
              out.print("</center>");
         myResult.close();
         statement.close();
         myConn.close();
         catch(SQLException e)
         out.println(e);
    %>
    </body>
    </html>
    bid_page.jsp
    <HTML>
    <HEAD>
    <TITLE>Welcome to the online Auction...</TITLE>
    </HEAD>
    <BODY>
    <%@ page language ="java" import = "java.io.*" import = "java.lang.*" import = "java.sql.*" %>
    <% try
         String thisUserName = (String) session.getAttribute("myUserName");
         String thisProName = (String) session.getAttribute("myProName");
              Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
         Connection myConn = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/Auction/Auction.mdb");
         PreparedStatement myStatement = myConn.prepareStatement("INSERT INTO tblHistory VALUES ('"+thisUserName+"', '"+thisProName+"', '"+request.getParameter("place_bid")+"')");
              myStatement.executeUpdate();
              myConn.commit();
              myStatement.close();
              myConn.close();
              catch(Exception e){}
    %>
    </BODY>
    </HTML>
    When i click on the BID button in the logged_page.jsp then i always get the last record and save into my table and that is not what i want to. i want to get the result on the same row as the BID button that just click and save to my table.
    Could you please advise?
    Thanks you very much for your time and any consideration you may give me.
    Best Regard,
    Kimsan

Maybe you are looking for