Re: Multipage JDBC result
What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
we are using orcale 8i, maybe it is the time to migrate to MySQL??:P thank you! Navneet Karnani [EMAIL PROTECTED] Sent by: news [EMAIL PROTECTED] 09/18/03 09:24 AM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: Multipage JDBC result
Julie, In Oracle, you can also limit the # of records returned and the the starting point using rownum. Your JDBC driver can also limit the # of ResultSets. Check the JavaDoc. Regards, Richard -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, September 18, 2003 10:48 AM To: Struts Users Mailing List Subject: Re: Multipage JDBC result we are using orcale 8i, maybe it is the time to migrate to MySQL??:P thank you! Navneet Karnani [EMAIL PROTECTED] Sent by: news [EMAIL PROTECTED] 09/18/03 09:24 AM Please respond to Struts Users Mailing List To: [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result What database are you using ? We use the MySQL database and have effectively used the limit clause to work with a limited set of records. we just store the query condition in the forms and work with that in every page. - Navneet [EMAIL PROTECTED] said the following on 18/09/2003 1:56 AM: It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
IMHO, this is an excellent article on TheServerSide.com Data List Handler: A Pattern for Large Search Result Sets http://www.theserverside.com/resources/article.jsp?l=DataListHandler -- Andrew Kuzmin http://www.java201.com - Original Message - From: Michael Muller [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 8:27 PM Subject: Re: Multipage JDBC result I read the documentation, but I can't tell what the pager iterates over. I'm assuming it iterates over java collections. This could be a problem if you have a huge result set. Another option would be to use database features like mysql's select * from foo limit 50 offset 250 syntax. It's still a lotta work for the database if there's a huge result set, but a lot easier on the web app. -- Mike Andrew Kuzmin wrote: Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = =
RE: Multipage JDBC result
You didn't specify whether you want to do client-side or server-side paging. Assuming you want to pull the whole resultset in one shot, but have a paged presentation, check out the Struts Layout taglibs. They have a very handy pager widget that uses javascript and tags. If you want to do server side, this is really more of a database issue than a struts issue, and a lot will depend on what database you are using. The downside is you have to do a round-trip to the server for the next page. Search on Google for Scrollable resultsets. Almost all JDBC drivers support them. Another method is to specify a LIMIT offset in your query to specify the number of rows you want returned and where in the resultset you want to return from. Exact syntax is database-specific. David -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, September 17, 2003 1:27 PM To: Struts Users Mailing List Subject: Re: Multipage JDBC result It seems that it pulled the whole JDBC resultset into the memory at one time(correct me if I am wrong at this point) since my data sets will be very huge, I don't think it is a good idea to pull down all the data to the session for paging. Any better solution /examples? very appreciated!! Julie Andrew Kuzmin [EMAIL PROTECTED] 09/16/03 09:12 AM Please respond to Struts Users Mailing List To: Struts Users Mailing List [EMAIL PROTECTED] cc: Subject:Re: Multipage JDBC result Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not intended recipient, you are hereby notified that you have received this transmittal and any such attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd (the Bank). The Bank accepts no responsibility for the accuracy or completeness of any information herein contained. = = = = = = = = = == = = = = = == = = = = = = = == = = = = = == = = = = --- Incoming mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003 --- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.515 / Virus Database: 313 - Release Date: 9/1/2003 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Multipage JDBC result
Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Multipage JDBC result
I read the documentation, but I can't tell what the pager iterates over. I'm assuming it iterates over java collections. This could be a problem if you have a huge result set. Another option would be to use database features like mysql's select * from foo limit 50 offset 250 syntax. It's still a lotta work for the database if there's a huge result set, but a lot easier on the web app. -- Mike Andrew Kuzmin wrote: Hi, see this link http://jakarta.apache.org/struts/faqs/newbie.html#pager -- Andrew Kuzmin http://www.java201.com - Original Message - From: Jonathan Hawkins [EMAIL PROTECTED] To: Struts Users Mailing List [EMAIL PROTECTED] Sent: Tuesday, September 16, 2003 3:39 PM Subject: Multipage JDBC result Howdy, Any tips as to where I can find code examples of how to break down a large JDBC result into say 25 rows per page? Jon Hawkins - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]