Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > Servlets
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Servlets section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old January 12th, 2005, 10:15 AM
Authorized User
 
Join Date: Oct 2004
Location: , , .
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Displaying query from three tables slims07 .NET Framework 2.0 8 April 2nd, 2008 10:47 AM
Matching rows in two tables donevco Access 13 April 25th, 2007 03:27 PM
Displaying tables in Visual C++ azhure Visual C++ 0 July 23rd, 2005 03:23 PM
Rows to columns by joining to tables subhasis SQL Server 2000 0 February 7th, 2005 09:26 AM
tables not displaying all the rows values... abhit_kumar JSP Basics 2 January 17th, 2005 12:03 AM



All times are GMT -4. The time now is 08:38 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.