Re: [VisualAge] Long lists in Client/Server application
- From: "Julian Ford" <rjford@xxxxxxxxxxxx>
- Date: Thu, 9 Feb 2006 08:54:42 -0500
Thanks for the reply.
Yes, being able to skip to the right record would be perfect. I didn't see
any
easy way to do that without actually fetching every row along the way,
though.
And this may eventually take quite a while to do. Certainly better than
reconstituting all the objects at once though (I have my own
object-relational
mapping framework). In an ideal world, I would be able to ask the cursor to
skip to a certain point, as you would do with a Stream, but I couldn't see
any
way to do that.
Julian
"Yanni Chiu" <yanni-REMOVETHIS@xxxxxxxxxx> wrote in message
news:nZKdnU5-1ozw3nfenZ2dnUVZ_sqdnZ2d@xxxxxxxxxxxxxxxxxxxxx
Julian Ford wrote:
Well, currently I am using Access (yeah, I know! But it's quick during
development),
but I will be rolling out using PostgreSQL. Perhaps, if it IS a database
limitation, I
should switch over now to see if I have the same issue on PostgreSQL.
PostgreSQL definitely has the transaction isolation so two
different connections will not interfere. However, if the
data access framework (i.e. VA code) doesn't allow you to
have more than one active connection (one for the query cursor
and one for the separate update), then the database wouldn't
the problem.
Assuming the database has the necessary isolation, you now
have a different problem. If the update were to insert a new
item that the user expects to see in the list immediately, then
your cursor is invalid from an application behaviour point
of view, even though the database could keep the two transactional
contexts separate.
But otherwise, you are exactly right...my search view is invalidated
because the
database cursor is lost over on the server. I certainly COULD resubmit
the
query, but I can't see any easy way to position the the cursor at the
correct point
A few years back I did something like:
- keep track of the record index (had this for free
since it was needed for next/prev links on the
web interface)
- rerun the query, skip to the index, check that
it is the same record previously selected. If not
then check the next one, because a new record
was inserted earlier in the list. If the next one
isn't the expected one, then give up because too
much has changed.
There were only expected to be about 10 users on the
system, and not even simultaneously doing similar tasks
(i.e. adding new people). So the list would rarely change.
YMMV.
--
Yanni Chiu
.
- Follow-Ups:
- Re: [VisualAge] Long lists in Client/Server application
- From: Yanni Chiu
- Re: [VisualAge] Long lists in Client/Server application
- References:
- [VisualAge] Long lists in Client/Server application
- From: Julian Ford
- Re: [VisualAge] Long lists in Client/Server application
- From: James Foster
- Re: [VisualAge] Long lists in Client/Server application
- From: Julian Ford
- Re: [VisualAge] Long lists in Client/Server application
- From: Yanni Chiu
- [VisualAge] Long lists in Client/Server application
- Prev by Date: Re: Subclassing Testcase as a normal practice?
- Next by Date: Re: How I can get price infomation about VW?
- Previous by thread: Re: [VisualAge] Long lists in Client/Server application
- Next by thread: Re: [VisualAge] Long lists in Client/Server application
- Index(es):
Relevant Pages
|