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

MS Access Data Changes Not Committing Before Next Read?


This is an interesting problem...

I'm using MS Access for the backend for a simple task list web
application. (I know, I know, but Access is all my Web Host will allow
without killing me in hosting fees...)

I haven't used Access for the back end of a website since 1999, so
maybe there is something I'm missing here.

When updating or inserting records into the database using ADO.NET, the
changes are not committing to the database immediately. When I select
from the table immediately after the update--even with the same
connection--I get a recordset that reflects the table prior to the
change. If I refresh the page, or pause for debugging, it apparently
gives access enough time to commit the change.

I had taken care of this temporarily by putting in a
System.Threading.Thread.Sleep(500) after statement that executes the
update, but now that I'm experimenting with Ajax (asyncronous calls)
with it, this problem is creeping up again.

Is there any command or Jet-SQL statement to force access to commit on
demand?

Thanks,

-Mark

Jan 26 '06 #1
2 1187
"Mark S. Milley, MCAD (BinarySwitch)" <ma*********@binaryswitch.com>
wrote in news:11**********************@g44g2000cwa.googlegr oups.com:
This is an interesting problem...

I'm using MS Access for the backend for a simple task list web
application. (I know, I know, but Access is all my Web Host will
allow without killing me in hosting fees...)
Uh, you're not using Access -- you're using JET.
I haven't used Access for the back end of a website since 1999, so
maybe there is something I'm missing here.

When updating or inserting records into the database using
ADO.NET, the changes are not committing to the database
immediately. When I select from the table immediately after the
update--even with the same connection--I get a recordset that
reflects the table prior to the change. If I refresh the page, or
pause for debugging, it apparently gives access enough time to
commit the change.
Is there a .Refresh method to the ADO connection object?

My guess here is that you are actually not getting current
information about the connection and some kind of refresh needs to
be done manually.

But I don't do ADO or ADO.NET, so I'm just guessing.
I had taken care of this temporarily by putting in a
System.Threading.Thread.Sleep(500) after statement that executes
the update, but now that I'm experimenting with Ajax (asyncronous
calls) with it, this problem is creeping up again.

Is there any command or Jet-SQL statement to force access to
commit on demand?


Access doesn't commit data -- JET does, so Access commands have
ZILCH to do with your commands.

What you need to find out is how your data interface (ADO.NET)
interacts with the Jet db engine.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 26 '06 #2
May be this article will help
http://support.microsoft.com/kb/q200300/

-----------------------------------------------------------------------
"When I select from the table immediately after the update--even with the
same connection"
I do not think that your statement correct.

It is easy to be tricked with ADO because if connection is busy (let say you
have open recordset on that connection) the ADO will silently open up new
connection and you will not even know that you have new connection

George.
"Mark S. Milley, MCAD (BinarySwitch)" <ma*********@binaryswitch.com> wrote
in message news:11**********************@g44g2000cwa.googlegr oups.com...

This is an interesting problem...

I'm using MS Access for the backend for a simple task list web
application. (I know, I know, but Access is all my Web Host will allow
without killing me in hosting fees...)

I haven't used Access for the back end of a website since 1999, so
maybe there is something I'm missing here.

When updating or inserting records into the database using ADO.NET, the
changes are not committing to the database immediately. When I select
from the table immediately after the update--even with the same
connection--I get a recordset that reflects the table prior to the
change. If I refresh the page, or pause for debugging, it apparently
gives access enough time to commit the change.

I had taken care of this temporarily by putting in a
System.Threading.Thread.Sleep(500) after statement that executes the
update, but now that I'm experimenting with Ajax (asyncronous calls)
with it, this problem is creeping up again.

Is there any command or Jet-SQL statement to force access to commit on
demand?

Thanks,

-Mark

Jan 26 '06 #3

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

Similar topics

2
by: Maria | last post by:
Hi Everyone This is a data base question so don't switch off thinking it is a Data Protection Act Question. I'm Looking for some general information regarding the UK Law on rights to access...
2
by: Roy Padgett | last post by:
I have a combo box where users select the customer name and can either go to the customer's info or open a list of the customer's orders. The RowSource for the combo box was a simple pass-through...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
11
by: Grasshopper | last post by:
Hi, I am automating Access reports to PDF using PDF Writer 6.0. I've created a DTS package to run the reports and schedule a job to run this DTS package. If I PC Anywhere into the server on...
1
by: Mr. B | last post by:
VB.net 2003 c/w Framework 1.1 and MS Access db We have a commercial program that does our Acounting and Time Sheets (Timberline). At least once a day our Accounting department runs a Script...
2
by: Mark S. Milley, MCAD (BinarySwitch) | last post by:
This is an interesting problem... I'm using MS Access for the backend for a simple task list web application. (I know, I know, but Access is all my Web Host will allow without killing me in...
7
by: gordy | last post by:
Hey all, I have a fairly simple app which goes out to the web to download data. I want to store this data in a database (1 table, ~8 fields or so). My program is written in VB.net and works...
5
by: Mahendra Kumar Kutare | last post by:
I am trying to implement a webserver with boss-worker model thread pool implementation - I have a header declaration threadpool.h as - typedef struct threadpool_work { void (*routine) ();...
10
by: giraffeboy | last post by:
Hi there, I'm having a problem with the Python db api, using MySQL. I've written a program with a GUI using wxPython, the GUI is contained in main.py which imports another module - reports.py....
5
by: simon.robin.jackson | last post by:
This requires a table called tblReplace with two text fields, old and new. Code: On Error Resume Next Dim db As DAO.Database Dim td As DAO.TableDef Dim f As DAO.Field Set db = CurrentDb
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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: 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
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
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.