Re: Close #FNbr
- From: DanS <t.h.i.s.n.t.h.a.t@xxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 13 Sep 2008 03:15:40 +0000 (UTC)
=?Utf-8?B?TG9yaW4=?= <Lorin@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in
news:B26872EA-FF16-40C3-B09B-8377D6F3EA48@xxxxxxxxxxxxx:
Strange responses before so I will try again since I am having the
same difficulties.
Working in the IDE I run into not being able to ( for example get the
file size using the API ) after I have closed a file Close #lFNbr that
was previously opened with Open sFileName For Binary Access Write Lock
Read Write as #lFNbr.
In order to perform the file size I seem to have to do Reset (close
and flush supposedly). The file size routine I use works just fine on
all other files.
The error message says that the file is in use by another application
which it is not since I just closed the file on the previous line.
Nothing else messes with that file. I just created it then closed it.
Reset closes all other open files and I do not want to do this.
But Rest do finally close it and allows the file size routine and any
other routine work.
Is it something to do with declaring Lock Read Write when I have
created the file?
What is the best way to handle this?
If you say use API Read and Write, then I have to say, I have a
similar problem there too. And there I call FlushBuffers but am still
having a problem accessing the file just written. But let's deal with
the Open For Binary first because I may just have a coding error on
this latter problem.
Any chance this is caused by 'Write Behind Caching' ?
.
- References:
- Close #FNbr
- From: Lorin
- Close #FNbr
- Prev by Date: Re: Sorting variant array on multiple columns
- Next by Date: Re: How to get a file's title
- Previous by thread: Re: Close #FNbr
- Next by thread: Compacting clears a 3021 error - why?
- Index(es):
Relevant Pages
|