Mike:
Not every time. We only had issues when creating a new table, or in our housekeeping routines when we created a blank new table to copy over all records from an old or damaged one.
So mainly, after creating a new table we closed it then called the winapi flushbuffers.
This C code sample is for the Harbour compiler we use, but you should get the gist of how to apply it to your own environment
HB_FUNC( FLUSHFILEBUFFERS )
{
HANDLE hFile = CreateFile( hb_parc(1), GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING | FILE_FLAG_WRITE_THROUGH, NULL );
hb_retl( FlushFileBuffers( hFile ) );
CloseHandle( hFile );
}
there's no validation that the full path to the file to flush is passed as the only param.
FlushFileBuffers( "c:\somewhere\abc.adt" )
HTH