• Subject: RE: DataBase access question.
  • From: "DUCRET Gilles (GVA)" <Gilles.DUCRET@xxxxxxxxxxxxx>
  • Date: Thu, 20 May 1999 12:03:48 +0200

I have already done this by implementing a server which works as a cache
on the database. This cache can be accessed with indexes (eg: record 50 to
100, 101 to 150, 1 to 10)

You can define a list which access this cache. All the scrolling operations
are managed by the list. The list can store only a given number of items
(eg:500, but can be 50. -> manage stored indexes). This is totaly
transparent. 

Hence your business layer works with this cache instead of directly using
ODBC.

You can do something like this: a list interface (say IList)
And two classes implementing this interface: StandardList and
ScrollableList.
Only the ScrollableList accesses the cache.

Your component is related to an object which implements IList.
If you want to support scrolling attach your component to a Scrollable list,
else attach it to a StandardList. The behaviour of your component will not
be affected
by the scrolling.

This had been written in C++ but the same behaviour can easily be written in
Java

Gilles
-----Original Message-----
From: Prakash Reddy [mailto:pcash400@hotmail.com]
Sent: jeudi, 20. mai 1999 08:17
To: JAVA400-L@midrange.com
Subject: DataBase access question.


Hi everybody,
coming right to the point,
I'm trying to display a report on the browser & I'm using java to do that 
job. I have a custom grid component, which can hold 500+ records at a time 
equipped with scroll bars.
If lets say the query resulted more than 500 records being selected I load 
the first 500 on the grid & load the next set only when the user scrolls 
down to that point.
Now comes the problem, if the user scrolls up I'll  need to load the 
previous 500 or nnn records back. And using result sets(I'm using ODBC) in 
java its difficult to read previous records. any ideas of how to achieve 
this. it may be actually a design issue, but I thought may be some of you 
guys might have already experienced something like this....
Remember I'm not much experienced in Java Pgming, so there might be things 
I'm missing.
Thanks a lot,
Prakash.


_______________________________________________________________
Get Free Email and Do More On The Web. Visit http://www.msn.com
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept for
the presence of computer viruses.
**********************************************************************
**********************************************************************
This email and any files transmitted with it are confidential and 
intended solely for the use of the individual or entity to whom they   
are addressed. If you have received this email in error please notify 
the system manager.

This footnote also confirms that this email message has been swept for
the presence of computer viruses.
**********************************************************************
+---
| This is the JAVA/400 Mailing List!
| To submit a new message, send your mail to JAVA400-L@midrange.com.
| To subscribe to this list send email to JAVA400-L-SUB@midrange.com.
| To unsubscribe from this list send email to JAVA400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2022 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.