Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 905
Default How to flush file buffers or ensure reliable writes?

When I do Print#, I do not want to buffer the data in the application.

I tried Len=0 on the Open statement. That results in an error, which comes
as no surprise given the documentation (help page).

Len=1 "works" insofar as there is no error. But I don't know if it is doing
what I intend.

Is there some way to flush the application buffer for a particular file
descriptor, other than closing and reopening the file?

Some applications and O/Ses have a flush statement or function or some file
operation that causes a flush, e.g. writing an EOF.

Extra credit....

Is there some way to flush O/S buffers for the file; that is, to initiate
(if not complete) writes to the disk?

That might be too much to ask ;-). Even closing the file does not always
accomplish that in some O/Ses. But some O/Ses provide functions for that
purpose (flushing O/S buffers), or at least they claim to.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 298
Default How to flush file buffers or ensure reliable writes?

I don't have an answer for your question, but out of interest what's the
problem you're trying to fix ?

Tim

"Joe User" <joeu2004 wrote in message
...
When I do Print#, I do not want to buffer the data in the application.

I tried Len=0 on the Open statement. That results in an error, which
comes as no surprise given the documentation (help page).

Len=1 "works" insofar as there is no error. But I don't know if it is
doing what I intend.

Is there some way to flush the application buffer for a particular file
descriptor, other than closing and reopening the file?

Some applications and O/Ses have a flush statement or function or some
file operation that causes a flush, e.g. writing an EOF.

Extra credit....

Is there some way to flush O/S buffers for the file; that is, to initiate
(if not complete) writes to the disk?

That might be too much to ask ;-). Even closing the file does not always
accomplish that in some O/Ses. But some O/Ses provide functions for that
purpose (flushing O/S buffers), or at least they claim to.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Shell command writes file to wrong directory Dustin Excel Programming 2 October 25th 07 07:06 PM
multiple buffers Shelley Excel Discussion (Misc queries) 0 September 26th 07 05:36 PM
how to flush away undo commands? kang New Users to Excel 1 June 1st 07 08:10 AM
Dir function to check for file not reliable RB Smissaert Excel Programming 6 January 25th 06 05:10 PM
excel flush right [email protected] Excel Discussion (Misc queries) 0 March 3rd 05 09:23 PM


All times are GMT +1. The time now is 09:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"