Re: Records added with ADO don't show up in query immediately

Tech-Archive recommends: Fix windows errors by optimizing your registry




"gerbski" <gerbski@xxxxxxxxxx> wrote in message
news:1167307890.296953.70070@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,

I am relatively new to ADO, but up to now I got things working the way
I wanted. But now I've run into somethng really annoying.

I am working in MS Access. I am using an Access frontend separately
from a backend. The tables from the backend database are linked in the
frontend database.
In the frontend there is a Form with a listbox in it. The listbox
rowsource is a query that selects all the records from a (linked)
table. Via this form I am adding new records to the table, and for this
a am using a ADO Connection and Recordset. The data is added to the
table via the AddNew and Update Methods of the recordset.
Now, when I Requery the Listbox in the form straight after the adding
of the record, I will not see the newly added record. It will take a
short time, from one second up to 3 seconds before I will see the newly
added record via a Requery of the Listbox. Which is very annoying, as
you can imagine.

I've got two possibilities to avoid this problem, both of which I have
not been able to find:
1) Perform a check to find when the data is 'really' added to the
database so i can then perform the requery.
2) force the recordset, connection or whatever to immediatly write te
data to the table and 'release' it for other queries to see, so I know
for sure my Requery will give the proper data.

Any help will be much appreciated!

Greetings,
Gerben.


If I understand you correctly you are working in MSAccess which is itself
accessing another MDB? If this is so, then delays are not all that uncommon.
There is a lot going on. It may be a simple matter of providing a DoEvent,
MDE, or something of that nature.

BUT ... You really need to post in an MSAccess newsgroup. This newsgroup is
for users of classic VB utlizing the ADO library. There may be other factors
at work and other work-arounds available based on your version of MSAccess
and how you are linking, etc. Those folks would know.

hth
-ralph



.



Relevant Pages

  • Re: Form Recordset Head Scratcher
    ... > I show that using the Recordset method of doing this is unreliable. ... > bottom of the listbox) the listbox moves up to fully display it but gives ... >> rowsource to coincide with the new user selection and requery the ... I have been trying to access the user selection information in two ...
    (microsoft.public.access.formscoding)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)
  • Re: Is ADO Dead (3)?
    ... The Design of ADO ... ADO uses a single object, the Recordset, as a common representation for ... a forward-only stream of results from a database, ... where data is updated at the data source or cached locally as with the ...
    (comp.databases.ms-access)