If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > JAVA > JDBCTemplate not fetching records more then 1500

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-06-11, 01:58
nitingautam nitingautam is offline
Registered User
 
Join Date: Nov 2008
Location: Delhi, India
Posts: 15
JDBCTemplate not fetching records more then 1500

Hi,

I am using JDBCTemplate for fetching the records...my table have 46,000 rows that I want to wrap in a user type object using rowmapper.

But when I try below code it shows " Executing SQL query [Select USER_ID,Desc from Q7.USERBSC_INFO where STAT_CD='ACTIVE']" and after that nothing happened..I waited for 15 minutes but still showed nothing..but application still working...no exception

I am using JCC drivers of DB2, this is a mainframe DB2

But when I run the query for only 1500 records it work fine...is there any limitation for fetching records?

Code:
public List<usr> getusr() {
    	List<usr> list = new ArrayList<usr>();
        String query = "Select USER_ID,Desc from Q7.USERBSC_INFO where STAT_CD='ACTIVE'";
        
list = getJdbcTemplate().query(query, DB2RowMapper.mUsrInfo);

        return list;
    }
RowMapper
Code:
public static RowMapper mUsrInfo = new RowMapper()
                {
                    public Object mapRow(ResultSet rs, int rowNum) throws SQLException
                    {
                     
                    	Usr usr=new Usr();
                        usr.setUsrId(rs.getString("USER_ID"));
                        usr.setDesc(rs.getString("DESC"));
                        return usr;
                        
                    }
                };
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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On