Re: File Activity

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Ralph (msnews.20.nt_consulting32_at_spamgourmet.com)
Date: 01/05/05


Date: Wed, 5 Jan 2005 11:45:32 -0600


"Bill-R" <BillR@yahoo.com> wrote in message
news:%239CnPRo8EHA.2112@TK2MSFTNGP14.phx.gbl...
> Is there any way to determine when File activity has finished?
>
> I have a App. that updates a 60mg Data File. I close the file after the
> update.
> Then reopen it in another module.
>
> Sometimes the file has not Physically been updated before I try to use it
> again.
>

You can use FindFirstChangeNotification with a FILE_NOTIFY_CHANGE_LAST_WRITE
flag. Followed by various wait and FindNextChangeNotification. This flag is
generally good at not signaling until the cache is empty.

But as Randy pointed out it could still be a 'crap-shoot' since depending on
load and whatever other stuff is going on, there is no way to know for
absolute certainty that everything has been written out.

We had a similar situation and managed it by having the first app close the
data file, then write out a small "done" file. The second process then
merely waited for the "done" file. Again - likely not a 100% reliable, but
appeared to work often enough for our purposes on a moderately busy box.

hth
-ralph



Relevant Pages

  • File Activity
    ... Is there any way to determine when File activity has finished? ... I have a App. ... that updates a 60mg Data File. ...
    (microsoft.public.vb.general.discussion)
  • Re: Windows XP auto updates stinks!!
    ... just use one exploit whereas you have to test all patches. ... you needn't install them. ... so I ignore any updates to it. ... you install an incompatible app ...
    (microsoft.public.windowsxp.general)
  • Re: WindowsXP memory error
    ... An app not shutting down correctly may be a problem with that particular ... Check for any App updates ... > I am have a problem with my Windows XP. ... > else or access the internet. ...
    (microsoft.public.windowsxp.hardware)
  • Re: Updating a database
    ... >>> resort to ADOX to do the updates. ... >>> first 3 are reference databases and I know their location from the ... >>> I was thinking that db updates will delivered in the same way as app ... >> cant patch the Access mdb. ...
    (microsoft.public.vb.general.discussion)
  • Re: Updating a database
    ... whilst the backend is an Access database. ... >>>I do changes to the app and the database (add fields, change queries, ... >>>User A updates to Version 1.1 ... >> the update by running the appropriate scripts. ...
    (microsoft.public.vb.general.discussion)