473,386 Members | 1,799 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,386 software developers and data experts.

Update not seen in subsequent query

Seeing an odd situation I've not seen before.

Have VB that updates a field in a table based on a form value when a
button is clicked. Directly after the .Update, I call another
function that does some other work and, in the process, queries the
table I just updated for the record I just updated and it does not see
the update I just made.

If I run in the debugger the problem doesn't occur. It seems like the
..Update event is not yet completed before the subsequent query is
executing (running in the debugger slows execution down sufficiently
for the update to complete?)

Is this a feasible explanation? Is there a solution?

The table involved is about 10,000 records.
Nov 12 '05 #1
3 1295
Try sticking in a DoEvents between the execution of the update query
and the subsequent select query. Queries execute asynchronously (I
think), so you could be trying to read the updated table before the
update is complete.
Nov 12 '05 #2
DFS

"Jeff Wilson" <jw*********@attbi.com> wrote in message
news:fc*************************@posting.google.co m...
Seeing an odd situation I've not seen before.

Have VB that updates a field in a table based on a form value when a
button is clicked. Directly after the .Update, I call another
function that does some other work and, in the process, queries the
table I just updated for the record I just updated and it does not see
the update I just made.
Jeff,

You probably need to issue a Refresh command somewhere to commit the change,
before calling the 2nd function.

If I run in the debugger the problem doesn't occur. It seems like the
.Update event is not yet completed before the subsequent query is
executing (running in the debugger slows execution down sufficiently
for the update to complete?)

Is this a feasible explanation? Is there a solution?

The table involved is about 10,000 records.

Nov 12 '05 #3
TC
Are the update and the query both running off the same
dbengine.workspace.database reference?

TC
"Jeff Wilson" <jw*********@attbi.com> wrote in message
news:fc*************************@posting.google.co m...
Seeing an odd situation I've not seen before.

Have VB that updates a field in a table based on a form value when a
button is clicked. Directly after the .Update, I call another
function that does some other work and, in the process, queries the
table I just updated for the record I just updated and it does not see
the update I just made.

If I run in the debugger the problem doesn't occur. It seems like the
.Update event is not yet completed before the subsequent query is
executing (running in the debugger slows execution down sufficiently
for the update to complete?)

Is this a feasible explanation? Is there a solution?

The table involved is about 10,000 records.

Nov 12 '05 #4

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

Similar topics

17
by: kalamos | last post by:
This statement fails update ded_temp a set a.balance = (select sum(b.ln_amt) from ded_temp b where a.cust_no = b.cust_no and a.ded_type_cd = b.ded_type_cd and a.chk_no = b.chk_no group by...
2
by: Pete | last post by:
After realizing the integrity of my data is questionable I went back to my update queries and opened up a few. The joins I had originally created between key fields were no longer there. It was...
16
by: Ian Davies | last post by:
Hello Needing help with a suitable solution. I have extracted records into a table under three columns 'category', 'comment' and share (the category column also holds the index no of the record...
3
by: eholz1 | last post by:
Hello PHP programmers. I had a brilliant idea on one of my pages that selects some data from my mysql database. I first set the page up to display some info and an image, just one item, with a...
1
by: rebexter | last post by:
I have a list of about 58,000 records which I created by merging numerous smaller lists, each of which contain a certain keyword. What I want to do now is update the master list of 58,000...
4
by: dougans | last post by:
Hey there people, Need help on this one if you can spare me a second!!! No idea why, been trying for 2 hours to fix this now and I feel like a complete loser haha. Anyone have any idea why...
10
by: Chris H | last post by:
Greetings, I'm trying to update an address field with "standard" abbreviations so that I can do a comparison of various accounts to one another on the address. I can update a set of records for...
2
by: jjb1214 | last post by:
Hi all, I've been unable to find the answer I'm looking for on the forums, so I'm asking my first-ever question. I'm building a windows forms application in Visual Basic using Visual Studio 2008....
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.