int row_to_display = 200 ;
FPSProdMap[] oProdMap= dbFpsProdMap.getProdMap(sLang,1,200);
change that value 200 to your number of records like if it is 1000 means change it in to 1000
vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
hi sunitha its no need to make new thread like this you could have added this code in your previous thread itself.... so you can get continuity for your problem solving.
vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
for that you have to get the rowcount value for that particular table and then keep that value in that place of int row_to_display =
i dont know the exact method for getting row count value..
just search in google for getting Rowcount value... i think it may be getRowCount()
vinod_javas
Practically a Posting Shark
871 posts since Feb 2007
Reputation Points: 119
Solved Threads: 7
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 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.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494