Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-01-2008, 11:43 AM
Java Tip's Avatar
Moderator
 
Join Date: Nov 2007
Posts: 1,691
Rep Power: 5
Java Tip will become famous soon enoughJava Tip will become famous soon enough
Default How to get whole record of a table into a java List
This sample code returns whole record of table into a java List.

Code:
public List getList() {

     jt = new JdbcTemplate(dataSource);
     List rows = jt.queryForList("select * from persone");
     return rows;
}
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Search a List in Java Java Tip java.lang 0 04-16-2008 11:38 PM
selecting a record in database ramachandran New To Java 0 10-25-2007 08:06 AM
How to get whole record of a table into a Java List JavaBean Java Tips 0 09-28-2007 02:01 PM
How to extract each record from a large XML doc. which contain multiple nodes renjan XML 1 07-26-2007 08:28 PM
Query with 1 record vs. multiple records anderma8 Database 5 07-10-2007 12:33 AM


All times are GMT +2. The time now is 11:44 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org