Database help - keeping track of records... 
Author Message
 Database help - keeping track of records...

I need to be able to retrieve info from each record, and then put this info
into say a list box.
        The problem I have is that when I use the code:

datadive.refresh
do while datadive.recordset.eof=false
        cbo1.additem datadive.recordset("location")
        datadive.recordset.movenext
loop

it cycles through all of the records on screen!
        I need a way to do this in the background (so that the user cannot
see what's going on).
        Can anybody tell me how to do this?

Thanks!
        Phil



Sat, 19 Apr 1997 07:51:54 GMT  
 Database help - keeping track of records...

Quote:


>Subject: Database help - keeping track of records...
>Date: 31 Oct 1994 23:51:54 GMT
>I need to be able to retrieve info from each record, and then put this info
>into say a list box.
>        The problem I have is that when I use the code:
>datadive.refresh
>do while datadive.recordset.eof=false
>        cbo1.additem datadive.recordset("location")
>        datadive.recordset.movenext
>loop
>it cycles through all of the records on screen!
>        I need a way to do this in the background (so that the user cannot
>see what's going on).
>        Can anybody tell me how to do this?
>Thanks!
>        Phil

Look at the clone method.
----------------------------------------------------------------------

James Roberts Computer Consulting            708/658-9409
----------------------------------------------------------------------


Sun, 20 Apr 1997 02:51:16 GMT  
 Database help - keeping track of records...

Quote:
> I need to be able to retrieve info from each record, and then put this info
> into say a list box.
>    The problem I have is that when I use the code:

> datadive.refresh
> do while datadive.recordset.eof=false
>    cbo1.additem datadive.recordset("location")
>    datadive.recordset.movenext
> loop

> it cycles through all of the records on screen!
>    I need a way to do this in the background (so that the user cannot
> see what's going on).
>    Can anybody tell me how to do this?

> Thanks!
>    Phil

Use a clone of the recorset rather than the recordset itself,

Dim dn as Dynaset '
datadive.refresh
Set dn=datadive.Recordset.Clone()
Do While dn.Eof=False
    cbo1.AddItem dn("location")
    dn.MoveNext
Loop

This should help you.

Harald Bjoroy



Sun, 20 Apr 1997 08:16:12 GMT  
 Database help - keeping track of records...

[loading listbox control at run-time]

Quote:
> it cycles through all of the records on screen!
>    I need a way to do this in the background (so that the user cannot
> see what's going on).
>    Can anybody tell me how to do this?
> Thanks!
>    Phil

I didn't find anything useful in the VB help file, Oct 94
knowledge base, or in the SDK help. A quick and dirty solution
might be to make the list box invisible while you load it.

--

Systems Mangler/Head Geek/Top Jolt {*filter*}, BFTSI
WARNING: I cannot be held responsible for the above        They're   coming  to
because  my cats have  apparently  learned to type.        take me away, ha ha!



Sun, 20 Apr 1997 08:04:29 GMT  
 Database help - keeping track of records...

Quote:

>    I need a way to do this in the background (so that the user cannot
> see what's going on).
>    Can anybody tell me how to do this?

Use a dynaset instead of a data control. Since a dynaset is a programmatic
object, it will not update the screen until specifically instructed to.
You'll have to give the user some clue as to what is going on, though,
since database operations tend to make the system sluggish, and the
unsuspecting user might think the application's crashed.

--

DBM Database Marketing Oy, Helsinki, FINLAND    " Q: What is the opposite
Tel: +358 0 605 900, Fax: +358 0 605 991         of information? "



Tue, 22 Apr 1997 15:55:24 GMT  
 Database help - keeping track of records...

Quote:


>>        I need a way to do this in the background (so that the user cannot
>> see what's going on).
>>        Can anybody tell me how to do this?
>Use a dynaset instead of a data control. Since a dynaset is a programmatic
>object, it will not update the screen until specifically instructed to.
>You'll have to give the user some clue as to what is going on, though,
>since database operations tend to make the system sluggish, and the
>unsuspecting user might think the application's crashed.

Or better yet...use a snapshot as they are faster than a dynaset when
simply pulling info from them. (I think...if not, I'm sure somebody
will correct me :). Same idea though...I would definatly
provide some kind of progress indicator though so the user doesn't
think the system is stalled.
--
----------------------------------------------------------------------------
    Peter G. Millard        ////////////////  "Error reading Drive A:

Co-Maintainer of comp.lang.basic.visual FAQ ================================


Thu, 24 Apr 1997 05:48:21 GMT  
 Database help - keeping track of records...
Phil: first close the recordset, then use the clone to fill the list box.
Hope this helps!

Justin

A
A


Quote:

>I need to be able to retrieve info from each record, and then put this info
>into say a list box.
>    The problem I have is that when I use the code:

>datadive.refresh
>do while datadive.recordset.eof=false
>    cbo1.additem datadive.recordset("location")
>    datadive.recordset.movenext
>loop

>it cycles through all of the records on screen!
>    I need a way to do this in the background (so that the user cannot
>see what's going on).
>    Can anybody tell me how to do this?

>Thanks!
>    Phil

--
Justin MacLeod, Bell Northern Research/Northern Telecom, Ottawa, Canada


Tue, 22 Apr 1997 02:36:14 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Database help - keeping track of records...

2. JCN - KEEPING TRACKS OF ALL CHANGES TO RECORDS IN AN ACCESS DATABASE

3. keeping Track Of Record

4. Keep track of excludes for each record

5. Keep Track of Excluded Users for each Record

6. using 3rd pty sw, keeping track of records

7. keeping track of records loaded to sql

8. Keep Track of Excluded Users for each record

9. Keeping Track of Database Modifications?!?!

10. Keeping track of Database changes!?

11. Keeping track of database file location

12. Help: Keeping track of opne windows

 

 
Powered by phpBB® Forum Software