473,378 Members | 1,407 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

ADO refresh problem...

Hello,

I have a main form with two continuous subforms - neither is using
master/child fields. Subform2 is bound to a local temp table. When I
update a record on subform1 it executes a function on subform2 that deletes
the records from teh temp table and repopulates it and of course executes a
me.requery afterweards. This is done with an ado connection object. The
problem is that subform2 doesn't "see" the data for a few seconds. I've
tried using a transaction and closing the conneciton object and using
DoEvents but it doesn't work. I've had to resort to putting in a 2 second
delay before the me.requery, but that's not reasonable. I must use the ADO
connection so DAO db object is out.

Is there a way to sync between the currentdb and ADO faster?

Thanks.

Matthew Wells
MW****@FirstByte.net
Mar 6 '06 #1
9 6670
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

Regards,
Russell Sinclair

Mar 6 '06 #2
Well what can you expect? ADO is the problem with everything except in
these special versions of Access that my friend Bill Gates sends
driectly to me where everything works perfectly, instantly and with a
minimum of fuss.

Mar 6 '06 #3
Well what can you expect? ADO is the problem with everything except in
these special versions of Access that my friend Bill Gates sends
driectly to me where everything works perfectly, instantly and with a
minimum of fuss.

Mar 6 '06 #4
I'm using Access for the back end so I can't use an ADO recordset behind the
subform (JET data is not editable), subsequently I can't use the same
connection. Becuase the subform is bound to a local Access table there is
inherently a lag between the ADO statement populating the local Access table
and the DAO bound form seeing the changes. I was hoping there was a way to
tell the Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.
<ru**************@gmail.com> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

Regards,
Russell Sinclair

Mar 6 '06 #5
I'm using Access for the back end so I can't use an ADO recordset behind the
subform (JET data is not editable), subsequently I can't use the same
connection. Becuase the subform is bound to a local Access table there is
inherently a lag between the ADO statement populating the local Access table
and the DAO bound form seeing the changes. I was hoping there was a way to
tell the Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.
<ru**************@gmail.com> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

Regards,
Russell Sinclair

Mar 6 '06 #6
"Matthew Wells" <MW****@FirstByte.net> wrote in
news:Uh*****************@newsread1.news.atl.earthl ink.net:
I'm using Access for the back end so I can't use an ADO recordset
behind the subform (JET data is not editable), subsequently I
can't use the same connection. Becuase the subform is bound to a
local Access table there is inherently a lag between the ADO
statement populating the local Access table and the DAO bound form
seeing the changes. I was hoping there was a way to tell the
Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.


I don't quite understand what you're doing that forces you to use
ADO instead of DAO. Are you absolutely sure about that?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Mar 6 '06 #7
"Matthew Wells" <MW****@FirstByte.net> wrote
I'm using Access for the back end so I can't use an ADO recordset behind
the
subform (JET data is not editable), subsequently I can't use the same
connection. Becuase the subform is bound to a local Access table there is
inherently a lag between the ADO statement populating the local Access
table
and the DAO bound form seeing the changes. I was hoping there was a way
to
tell the Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.
<ru**************@gmail.com> wrote
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

What you are experiencing is not an ADO issue, but a code problem. You
should always use CurrentProject.Connection, unless you are accessing a
remote, non-linked database. If there is any "lag", it is because you have
attempted to create a New ADODB.Connection to the current db, and that is
known to cause a delay. Just don't do it.

Although you may not be able to use ADO to edit a Recordset, you can
certainly use ADO to edit the underlying data table. If the underlying data
is a query, you can also use the Recordset.Clone to edit the data.

Perhaps if you posted your code?

Also, as David Fenton said, why do you feel you *have to* use ADO? I use it
because I'm comfortable with it, but if you're working with Access on FE and
BE, then there's nothing preventing you from using DAO.
--
Darryl Kerkeslager
Mar 6 '06 #8
Matthew Wells wrote in message
<Uh*****************@newsread1.news.atl.earthlink. net> :
I'm using Access for the back end so I can't use an ADO recordset behind the
subform (JET data is not editable), subsequently I can't use the same
connection. Becuase the subform is bound to a local Access table there is
inherently a lag between the ADO statement populating the local Access table
and the DAO bound form seeing the changes. I was hoping there was a way to
tell the Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.
<ru**************@gmail.com> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

Regards,
Russell Sinclair


I think it is Access 2000 that has a problem with not updateable ADO
form recorsets based on Jet data, not later versions
http://support.microsoft.com/kb/281998/EN-US/
http://support.microsoft.com/default...b;EN-US;227053

Since you're dealing with both DAO and ADO, the following will probably
not work, either, but perhaps it can give some ideas?
http://support.microsoft.com/kb/q200300/

But perhaps as the others have suggested, you migth get off a bit
easier by having a look at a DAO approach.

--
Roy-Vidar
Mar 7 '06 #9
I will be moving to SQL Server so I'm trying to write my code in ADO now.
I'm also stuck using Access 2000. I am trying to write the entire system
using unbound forms and no table links. This works fine for everything
except continuous subforms. I also can't use third-party controls - which I
like - so I am very constricted. A good grid control would work very well
but I can't use it. It looks like I'm stuck using DAO for those subforms.

Thansk for all your help out there.

"Matthew Wells" <MW****@FirstByte.net> wrote in message
news:EG***************@newsread3.news.atl.earthlin k.net...
I'm using Access for the back end so I can't use an ADO recordset behind the subform (JET data is not editable), subsequently I can't use the same
connection. Becuase the subform is bound to a local Access table there is
inherently a lag between the ADO statement populating the local Access table and the DAO bound form seeing the changes. I was hoping there was a way to tell the Access form that new data is there - go get it. me.requery won't
work because the currentdb still doesn't know of the changes.
<ru**************@gmail.com> wrote in message
news:11*********************@p10g2000cwp.googlegro ups.com...
I believe that this is a result of a "feature" in ADO that means that
you can't see the changes between different connections in Access for a
specified time (I think it's 5 seconds though). Are you using the same
connection object or creating a new one? I'd suggest using
CurrentProject.Connection if at all possible or passing the current
connection between the forms.

Regards,
Russell Sinclair


Mar 16 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Mark | last post by:
I have a working PHP/MySQL application used for data entry. The data entry screen includes a "Save" button. The PHP code for this button looks like this: if (isset($_POST)) { if ($_POST ==...
4
by: Noel Wood | last post by:
Hello, I have a problem that I'm sure is simple but I have searched the newsgroup and have not found it posted before so I apologize if it has been asked heaps of times before. I have a page that...
3
by: Scott | last post by:
I have a clickable graph that resides on page 1. If user clicks a data point on the graph, the page runs again yeilding a 2nd graph that shows a more detailed graph. Problem is, I have a...
5
by: Steve | last post by:
Hi, I have a private website for 20 people that is similar to a web email client like hotmail. There are two frames, one on the left with links for "New", "History", "Todays" and a frame on the...
12
by: Tarken | last post by:
Hi, I am trying to do some refactoring of a web site to ensure that it displays in the most web clients possible. One of the pages requires to be redirected to another automatically, for one...
4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
1
by: ppatel | last post by:
Problem I have a problem with web image button control click event. The click event does not get trigger until it has not been clicked once or page refresh occures(which is fine). When click...
7
by: Juan Romero | last post by:
Hey guys, please HELP I am going nuts with the datagrid control. I cannot get the damn control to refresh. I am using soap to get information from a web service. I have an XML writer output...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.