Re: Multiple RowSets redux...
- From: mdR <mrafn@xxxxxxxxxxx>
- Date: Wed, 30 Jan 2008 05:40:15 -0800 (PST)
On Jan 29, 9:50 pm, Lew <l...@xxxxxxxxxxxxx> wrote:
mdR wrote:
i [sic] am trying to build an app that displays data from multiple
tables in a single Derby database. the tables will be displayed in
two different JTables with two different TableModels displayed on the
same frame. Each TableModels will get their data from a JDBCRowSet
object. My question is, should each TableModel have it's [sic] own
JDBCRowSet instance; which seems the most straight-forward, but
What is the package in which 'JDBCRowSet' resides? The only similarly-named
API type I can find is
<http://java.sun.com/javase/6/docs/api/javax/sql/rowset/JdbcRowSet.html>
but that's not what you said. What is the class you're discussing?
If it is JdbcRowSet, that does not have the ability to be a disconnected
RowSet. (Read the Javadocs.) And you need to be more careful about spelling.
Case counts!
requires multiple connections--or is there a better way-- to somehow
use one connection and retrieve multiple result sets?
If you reuse a RowSet, or any ResultSet,> A ResultSet object is automatically closed when the Statement object
that generated it is closed, re-executed, or used to retrieve the
next result from a sequence of multiple results.
<http://java.sun.com/javase/6/docs/api/java/sql/ResultSet.html>
This presumably will not affect disconnected RowSets, but the fact remains
that re-using a RowSet for multiple models will be very difficult. Each time
you load it for one TableModel, you somehow would have to get the other
TableModel not to use it, and vice versa. Seems complicated.
--
Lew
The word "I" in English is capitalized. Case counts.
Thanks again for the reply... (it was late and I just wanted to get
some answers overnight for today--got lazy on the caps)
I kind of thought re-using a RowSet would be trouble and difficult to
manage. So that answers that.
Yes, I meant JdbcRowSet, and I'm not sure that I want a disconnected
RowSet. It's going to be a fairly large database. It probably won't
be able to load all in memory. Wouldn't I want to use JdbcRowSet?
-mark
.
- Follow-Ups:
- Re: Multiple RowSets redux...
- From: Lew
- Re: Multiple RowSets redux...
- References:
- Multiple RowSets redux...
- From: mdR
- Re: Multiple RowSets redux...
- From: Lew
- Multiple RowSets redux...
- Prev by Date: Re: Multiple RowSets redux...
- Next by Date: Re: Multiple RowSets redux...
- Previous by thread: Re: Multiple RowSets redux...
- Next by thread: Re: Multiple RowSets redux...
- Index(es):
Relevant Pages
|
|