ADO.Requery vs. Combobox.refill / refresh 
Author Message
 ADO.Requery vs. Combobox.refill / refresh

Hello,

We have a DBComboBox and other textbox controls bound to a recordset, to
synchronize the display among these controls when one is updated, would a
RecordSet.Requery plus control re-binding be absolutely needed, or is there
an option?

I am not sure about the difference between Refill and Refresh methods, which
would provide better data synchronization and would any of them trigger the
bound recordset's requery automatically?

Do we need to be concerned with performance issues that RecordSet.Requery's
would possibly bring along? If a display refresh is required for each change
of focus, a corresponding requery for each move would seem inefficient.

Thanks in advance.

Regards,
Peter



Mon, 30 Dec 2002 03:00:00 GMT  
 ADO.Requery vs. Combobox.refill / refresh
True on the inefficient point.....

I do have one application that has a True DB Grid tied to a recordset. As
the recordset changes (I have an Outlook style application and the view is
the DB Grid to list the selected data), I do an ADO control.refresh to reset
the control's RecordSource that changed (a new query) and then I set the
grid's data by Refreshing() it also. Then the column headers are set and any
other properties as needed to make the column data editable or not as needed
for each view.

Even though some views may have a few thousand recs, it happens in a sec or
two on a P450 machine.

The larger issue in my mind is the connection that is left open when doing
this.

If I have over 20 users in the Outlook portion of the application, then 20
active connections are constantly opened. Each data entry form has a data
class that loads the form and disconnects when done loading.

Do you know of a way to connect and disconnect an ADO control and a grid?
That would help me out I think.

--
Russ E. R.
DMCI-modis
Director, Software Development



Quote:
> Hello,

> We have a DBComboBox and other textbox controls bound to a recordset, to
> synchronize the display among these controls when one is updated, would a
> RecordSet.Requery plus control re-binding be absolutely needed, or is
there
> an option?

> I am not sure about the difference between Refill and Refresh methods,
which
> would provide better data synchronization and would any of them trigger
the
> bound recordset's requery automatically?

> Do we need to be concerned with performance issues that
RecordSet.Requery's
> would possibly bring along? If a display refresh is required for each
change
> of focus, a corresponding requery for each move would seem inefficient.

> Thanks in advance.

> Regards,
> Peter



Mon, 30 Dec 2002 03:00:00 GMT  
 ADO.Requery vs. Combobox.refill / refresh
If I understand this - you could try using the ado save command and use the
ado Filter command.

Set . Cursorlocation  for aduseclient
myRecordObject.save "C:\MyApp\myRecordObject.txt"

This will write a recordset file to the local machine with any name you
specify containing the initial unfiltered recordset (or filtered first if
required).

Thereafter I believe you can concentate filters to the recordset  as
required.
I think this is the only good way to limit network traffic and speed up you
application when updates are not needed.
Regards
Dave



Quote:
> True on the inefficient point.....

> I do have one application that has a True DB Grid tied to a recordset. As
> the recordset changes (I have an Outlook style application and the view is
> the DB Grid to list the selected data), I do an ADO control.refresh to
reset
> the control's RecordSource that changed (a new query) and then I set the
> grid's data by Refreshing() it also. Then the column headers are set and
any
> other properties as needed to make the column data editable or not as
needed
> for each view.

> Even though some views may have a few thousand recs, it happens in a sec
or
> two on a P450 machine.

> The larger issue in my mind is the connection that is left open when doing
> this.

> If I have over 20 users in the Outlook portion of the application, then 20
> active connections are constantly opened. Each data entry form has a data
> class that loads the form and disconnects when done loading.

> Do you know of a way to connect and disconnect an ADO control and a grid?
> That would help me out I think.

> --
> Russ E. R.
> DMCI-modis
> Director, Software Development




> > Hello,

> > We have a DBComboBox and other textbox controls bound to a recordset, to
> > synchronize the display among these controls when one is updated, would
a
> > RecordSet.Requery plus control re-binding be absolutely needed, or is
> there
> > an option?

> > I am not sure about the difference between Refill and Refresh methods,
> which
> > would provide better data synchronization and would any of them trigger
> the
> > bound recordset's requery automatically?

> > Do we need to be concerned with performance issues that
> RecordSet.Requery's
> > would possibly bring along? If a display refresh is required for each
> change
> > of focus, a corresponding requery for each move would seem inefficient.

> > Thanks in advance.

> > Regards,
> > Peter



Sat, 04 Jan 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. refill or refresh of a datacombo

2. refill refresh functions

3. How do I refill a datalist after filtering the ado data control

4. Refresh, requery, etc.

5. Refresh/Requery don't seem to work while doing file I/O

6. Automatic Refresh / Requery

7. How can I refresh/requery data in data grid after add new/edit

8. refresh or requery

9. differences between update, refresh and requery

10. Refresh/requery of child record sets

11. Refresh or Requery?

12. Delete Then "Refresh/Requery" DataGrid

 

 
Powered by phpBB® Forum Software