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. 3 1303
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.
"Jeff Wilson" <jw*********@at tbi.com> wrote in message
news:fc******** *************** **@posting.goog le.com... 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.
Are the update and the query both running off the same
dbengine.worksp ace.database reference?
TC
"Jeff Wilson" <jw*********@at tbi.com> wrote in message
news:fc******** *************** **@posting.goog le.com... 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. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 cust_no, ded_type_cd, chk_no)
|
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 as if someone
when in and deleted them. I have been using Access for 10 years and
I've never seen such a thing. My temporary solution is to embed my
update queries in vb as a SQL string. That way I know the SQL will not
get modified. More and...
|
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 in a hidden field)
I wish the user to be able to edit the data in the table, so I have
extracted the records into hiddenfield, textareas, dropdown list and
checkbox so that they can make changes.
I named these elements as arrays and wish to run an...
|
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 row of data, etc.
then I thought it would be nice to do a select, and perhaps an update
(the title of the image) on the same page.
|
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 records so that each line shows which of one or more keywords that record contains.
For example, the original source tables contain the following fields:
DocID, Keyword
where DocID uniquely identifies each record no matter what table that record...
| |
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 my UPDATE statements seem to be running 4 times when footer.inc.php is included but when I comment it out the UPDATE statement does not multiply the amount by 4????
It's the craziest thing I've ever seen, and the first ever time I'm seriously...
|
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 "Road" to "Rd", but when I
tried to stack the update clauses, I seem to get random updates within
the file. All the updates are correct, but they're incomplete. Not
sure how this needs to be done, I added a TOP statement but that
didn't work. ...
|
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. I have an Access database behind it that I'm building on. I've only been playing around with VB for a few months now, so forgive any misconceptions I may have....here's what I'm trying to accomplish:
I have two tables in the database, and I need...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |