| | |
plzzzzzzzzz urgent
Please support our JSP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2007
Posts: 10
Reputation:
Solved Threads: 0
<%
int currentRow = 0;
here is my code contain in a jsp.
here records are displayed upto 200 only.
and one thing that more than 200 records are successfully added to the database
but Iam getting record display upto 200 only.
now can any one suggest that in a way
that i have to make my jsp to display
any number of records that I add. i.e dynamically.
int currentRow = 0;
JSP Syntax (Toggle Plain Text)
int startingRow = ParamUtils.getIntParameter(request, "startingRow", 0); int row_to_display = 200 ; String errcode = null ; try{ FPSProdMap[] oProdMap= dbFpsProdMap.getProdMap(sLang,1,200); if (oProdMap != null) { for (int i = 0; i < oProdMap.length; i++) { currentRow++; out.println("<TR><TD class='xRight' width='5%'>"+currentRow+"</TD>"); ------- } }
here is my code contain in a jsp.
here records are displayed upto 200 only.
and one thing that more than 200 records are successfully added to the database
but Iam getting record display upto 200 only.
now can any one suggest that in a way
that i have to make my jsp to display
any number of records that I add. i.e dynamically.
Of course, be forewarned, that unless you have locked the table you're using (and if you don't know how then just forget I mentioned that as I am not going to explain it), then between the time that you get the total with that query, and then actually pull the records from the database, the number of records could have changed (i.e. records added and/or deleted).
You would be much better off rewriting the
The method can then, simply cycle through the resultSet adding FPSProdMap Objects to the ArrayList as it goes, and then, as mentioned, return an array created from this ArrayList.
You would be much better off rewriting the
dbFpsProdMap.getProdMap(sLang,1,200); method to internally produce an ArrayList, that can be grown dynamically and simply returning an array created from that ArrayList. (I'm assuming that sLang is the resultSet, if not pass it the resultSet and let it populate itself.) Then it will probably look like either dbFpsProdMap.getProdMap(sLang); (If sLang is a resultSet) or dbFpsProdMap.getProdMap(sLang, rs); (If it is not.)The method can then, simply cycle through the resultSet adding FPSProdMap Objects to the ArrayList as it goes, and then, as mentioned, return an array created from this ArrayList.
Last edited by masijade; Jul 26th, 2007 at 8:12 am. Reason: typo
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- Homepage keeps switching back to a porn site (Web Browsers)
- Importing SQL Script File - Urgent !! (Database Design)
Other Threads in the JSP Forum
- Previous Thread: how to make dynamic
- Next Thread: How to run iReport jrxml from a jsp page
| Thread Tools | Search this Thread |
apache array backbutton combobox comma connection csv database development directorystructure dropdownlist dynamicpagetitles eclipse frames glassfish ie8 imagetodatabse imageupload integer internet java javaee javascript jsf jsp jsppagetitles levels mvc2 mvcmodel2 mysql netbeans network parameters passing ping printinserverinsteadofclient project read redirect request.getparameter response seperated servlet servletdopost()readxml sessions software sql ssl state_saving_method stocks sun tomcat tutorial update values video web write






