50,000 Record database to Listbox 
Author Message
 50,000 Record database to Listbox

Hi All,

I Have a 50,000 record database that I want to display in a Listbox.
Obviously I do not want to retrieve the entire database from the
server, so this is how I did it.

1. Moved a DataControl and relevant statictext fields for each
database field into an unused part of my window (set the visable flag
to off).

2. Created a list box (no vert scroll bar), and a separate scroll bar
next to it.

3. Set the maximum value of the scroll bar to the number of records in
my database (The datacontrol has this property).

4. The list box is filled with the first 20 records from the database:
I use the data control to move to the next record, and then copy the
values out of each static text field into my list box.

5. When the user moves the scrollbar, the listbox is cleared, the
datacontrol is 'moveto'ed the record number in the database that
matches the value of the scroll bar, and 20 records are retrieved from
the file from that point, and copied into the listbox.

Though this works, it seams messy, (I don't think the datacontrol
should be used this way!).....

But, unless anyone has any idea how to access the n'th record in an
sql select, then this seams like my only option. Has anyone else had a
similar problem?

Tony.



Fri, 03 Dec 2004 20:37:30 GMT  
 50,000 Record database to Listbox

Quote:

> But, unless anyone has any idea how to access the n'th record in an
> sql select, then this seams like my only option. Has anyone else had a
> similar problem?

On the Valentina Examples there is exactly such a listbox.
But you have to change some things for other database engines.

Mfg
Christian

--
Live von der Cebit Stand A15 in Halle 11.
Prof. I. Keesmann & C. Schmitz zeigen Analysen Tetraeder,
ein Realbasic Programm fr die Geologie.



Mon, 06 Dec 2004 23:00:08 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. usd 50,000 IN 4 WEEKS

2. Editing a database record from a listbox

3. how maximize records display in maximized BrowseBox/Listbox

4. Locating 1st level record in RelTree listbox

5. 50000!!!

6. database and listbox linking

7. Changing Database-Bound ListBox Column Order

8. How to delete a record from a database....

9. How to insert a database record?

10. Database : destroy a record

11. deleting record in database

12. Problems adding records to RB database

 

 
Powered by phpBB® Forum Software