Processing ResultSets into custom beans can be a frustrating process..

You should have look at javax.servlet.jsp.jstl.sql.ResultImpl and associated
classes.

You will find in the jstl source distribution.

Essentially, with a little effort, these classes will process a ResultSet
and return a javax.servlet.jsp.jstl.sql.Result object. The Result object is
easily itterated over in your JSP

db



-----Original Message-----
From: Manisha Sathe [mailto:[EMAIL PROTECTED]
Sent: 18 January 2005 09:34
To: Struts Users Mailing List
Subject: Re: How to limit the result?


After long search i found out that MSSQL does not support Limit / range of
records to be fetched.

Now i am thinking ->
1)putting each row into one databean.
2)Put databean into ArrayList
3)send this arraylist back to JSP

with jstl tags i can loop through it and display. <c:foreach>...<c:out>

But how i can decide it has reached page limit ? because at that point of
time i want to display my footer (and header for new set).

Is there any way to set some variable and keep on incrementing it .. check
for pagesize and then include header/footer etc...

Is there any better solution ? Am i going a long way ?

regards
Manisha





Manisha Sathe <[EMAIL PROTECTED]> wrote:
I have a query which results into large data. This data i want to display in
a group of 20. After every 20 records i want to add header and footer to it.

Is it possible to get the result set data into batch of 20 ? means can i
specify start and end index of query ?

regards
Manisha



---------------------------------
Do you Yahoo!?
The all-new My Yahoo!  What will yours do?

---------------------------------
Do you Yahoo!?
 The all-new My Yahoo!  Get yours free!
======================================================= 
This message has been scanned for viruses and dangerous 
content using Vet Anti-Virus Protection and is believed 
to be clean. 
=======================================================

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to