Data being written to disk is pending.

  • Thread starter Thread starter Albert
  • Start date Start date
A

Albert

Hello expert,

I use AccXP with ADO. Problem is data being written to disk is pending. That
cause the succeding process, which read data from disk, get the not updated
data. Oner person suggested me to use DBEngine.Idle RefreshCache and
JRO.RefreshCache CNN. Those can help but not 100%. Sometime I still found
problem. Except that if I wait for more 4-5 seconds to sure that data is
written to disk.

I would like to know is there any way to check that some data is still
pending. So, I can loop until all are written completely.

TIA,
Albert
 
Hello,
Try using FileCopy. I believe if the file is open it
will return error number 70, if not just open a file then
use filecopy to copy over it and get that error number.
use error trapping for that number keep looping until it
can copy to that location. I think that will work for u.
 
Here something that I think will work 4 u...

Sub testmove(fileloc As String, fileDest As String)
On Error GoTo Err_Proc:

FileCopy fileloc, fileDest

Exit_Proc:
Exit Sub
Err_Proc:
Select Case Err.Number
Case 70
Call testmove
Case Else
MsgBox Err.Number & " " & Err.Description
Resume Exit_Proc
Resume
End Select
End Sub
 
Back
Top