JDBC ResultSet in a web form with scrollbar
Hi,
I was wondering if anybody has any ideas how I could display a ResultSet from JDBC in a web form with a scroll bar. I thought I could put the JDBC in an iframe but I think the src attribute of an iframe only takes file paths not ResultSets. Has anybody got any other ideas?
[281 byte] By [
hugh] at [2007-11-11 8:26:23]

# 1 Re: JDBC ResultSet in a web form with scrollbar
u want it in a web form in your desktop application or on the web in ur browser. Use jsp for ur browser. if u want to use it in ur application then u can use a Jlabel with a Jscrollpane, but u will not be able to click any links, for that u will need to over ride some mouse methods. hope that helps.
major at 2007-11-11 22:35:20 >

# 2 Re: JDBC ResultSet in a web form with scrollbar
Thank you for your reply Major,
I would like the scrollable ResultSet to appear in a browser so it looks like I am going to have to learn some JSP to do this, at the moment I use my servlet to generate html so I wondered if there was a html solution. This assignment is due this week so I dont really have the time to learn JSP so I'm still interested to hear other suggestions. One compromise solution I'm thinking of is to use the mySQL LIMIT command to only show the first 20 results then a button to show the next 20 and the next and so on. This is not as nice as a scrollbar but I may end up doing this.
Thanks for your reply anyway, and I shall learn some JSP once I get time.
hugh at 2007-11-11 22:36:21 >

# 3 Re: JDBC ResultSet in a web form with scrollbar
No problem, funny im handing in a serverlet/jsp assignment after easter.
major at 2007-11-11 22:37:24 >

# 4 Re: JDBC ResultSet in a web form with scrollbar
One compromise solution I'm thinking of is to use the mySQL LIMIT command to only show the first 20 results then a button to show the next 20 and the next and so on. This is not as nice as a scrollbar but I may end up doing this
when you do so, don't forget to order your data, or your select statements will return your data in different order on each invokation.
i suggest to use the autogenerated primary key to dort ascending (if you have).