Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / December 2006



Tip: Looking for answers? Try searching our database.

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

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gerbski - 28 Dec 2006 12:11 GMT
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.
Ralph - 28 Dec 2006 14:54 GMT
> Hi all,
>
[quoted text clipped - 27 lines]
> 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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.