MS Access Data Changes Not Committing Before Next Read?

  • Thread starter Mark S. Milley, MCAD (BinarySwitch)
  • Start date
M

Mark S. Milley, MCAD (BinarySwitch)

Hi All -

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
 
W

Wayne Morgan

There is a Flush method of the Stream object. The help says that it is
"usually" not necessary and that if you issue a Close command, that the
stream is flushed automatically.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top