Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 12th, 2005, 01:49 AM
abhit_kumar abhit_kumar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 22 abhit_kumar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 3 sec
Reputation Power: 0
tables not displaying all the rows values...

i have used servlet for displaying inserted values in the oracle database.

it retrieved values from hrml page..there is table which is shown as below:


<tr>
<td><input type="text" name="Ac.code" size="5" maxlength="5"></td>
<td><input type="text" name="slcode" size="10" ></td>
<td><input type="text" name="debit" size="12" onkeyup="addT('tdebit',this)"></td>
<td> <input type="text" name="credit" size="12" onkeyup="addT('tcredit',this)"></td>
</tr>
<tr>
<td><input type="text" name="Ac.code_2" size="5" maxlength="5"></td>
<td><input type="text" name="slcode_2" size="10" ></td>
<td><input type="text" name="debit_2" size="12" onkeyup="addT('tdebit',this)"></td>
<td> <input type="text" name="credit_2" size="12" onkeyup="addT('tcredit',this)"></td>
</tr>

the values taken from html page and it is inserted into the database..my insertion of values is working..i have used addbatch method for the same..due to the insertion of multiple values..

i have used following query..(this is the jsp page for displaying values)


PreparedStatement sql = conn.prepareStatement("SELECT * FROM pay_header,pay_detail where pay_header.vou_no like 'BP%' and pay_detail.vou_no='"+temp+"' ");

results = sql.executeQuery();

while(results.next())
{

ac_code = results.getInt("ac_code");
sl_code = results.getInt("sl_code");
db_amt = results.getFloat("db_amt");
cr_amt = results.getFloat("cr_amt");

out.println("<tr><td> <INPUT TYPE='TEXT' NAME='ac_code' size='12' value='" + ac_code + "' readonly </td>");out.println("<td>

<INPUT TYPE='TEXT' NAME='sl_code' size='12' value='" + sl_code + "' readonly </td>");

out.println("<td><INPUT TYPE='TEXT' NAME='db_amt' size='12' value='" + db_amt + "' readonly </td>");

out.println("<td> <INPUT TYPE='TEXT' NAME='cr_amt' size='12' value='" + cr_amt + "' readonly </td></tr>");


my problem is that after insertion in database...it displays only first row of the table..the second row doesnot display in the jsp page..


as the both the rows are inserted in database(that i have checked)..but its not displaying....

help me for the same...

makes the changes in my query..if is there any problem in this..


thanx

Reply With Quote
  #2  
Old January 15th, 2005, 04:22 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
Could it be that your HTMLpage shown is the page as it was saved in the cache ? Try to do a refresh of your page
and let us know what the result is.

Reply With Quote
  #3  
Old January 16th, 2005, 10:01 PM
abhit_kumar abhit_kumar is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2004
Posts: 22 abhit_kumar User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 3 sec
Reputation Power: 0
i have refreshed...but the result is same.


help

Reply With Quote
  #4  
Old January 22nd, 2005, 03:14 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
To prevent a page from being saved in the cache, and thus displaying
old information, you should add the following lines at the beginning of
your JSP.

<%
response.setHeader("Cache-Control","no-cache");
response.setHeader("Expires", "0");
response.setHeader("Pragma", "No-cache");
response.addHeader("Cache-control", "no-store"); // tell proxy not to cache
response.addHeader("Cache-control", "max-age=0"); // stale right away
%>

Try it out and let us know if this has solved your problem.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > tables not displaying all the rows values...


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap