Anyone know what can cause a file access denied error (005)? 
Author Message
 Anyone know what can cause a file access denied error (005)?

Hi, my problem is pretty much what the title says.

When I try to store a record in a file (overwriting some
existing data), I get a file access denied error. The file has
been opened and closed, and not corrupted, so what is the
problem? Is Win98 playing any part in this file mess-up? Am I
modifying it too quickly, and not giving windows time to update
it's disk cache?

Thanks for any input into this subject

Jim

* Sent from RemarQ http://www.*-*-*.com/ The Internet's Discussion Network *
The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?

Quote:

> When I try to store a record in a file (overwriting some
> existing data), I get a file access denied error. The file has
> been opened and closed, and not corrupted, so what is the
> problem? Is Win98 playing any part in this file mess-up? Am I
> modifying it too quickly, and not giving windows time to update
> it's disk cache?

It would be helpful if you posted the relevant part of the source code...


Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?
Jim.

Without any code snippets, my first guess would be that you have, possibly
inadvertently, opened the file twice in your program. This can sometimes
cause 'access denied' problems.

Kind regards
Ian

Quote:

>Hi, my problem is pretty much what the title says.

>When I try to store a record in a file (overwriting some
>existing data), I get a file access denied error. The file has
>been opened and closed, and not corrupted, so what is the
>problem? Is Win98 playing any part in this file mess-up? Am I
>modifying it too quickly, and not giving windows time to update
>it's disk cache?

>Thanks for any input into this subject

>Jim

>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
*
>The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?
Or you could have opened the file with another application like
notepad or word ??
ronald
Quote:

>Jim.

>Without any code snippets, my first guess would be that you have, possibly
>inadvertently, opened the file twice in your program. This can sometimes
>cause 'access denied' problems.

>Kind regards
>Ian


>>Hi, my problem is pretty much what the title says.

>>When I try to store a record in a file (overwriting some
>>existing data), I get a file access denied error. The file has
>>been opened and closed, and not corrupted, so what is the
>>problem? Is Win98 playing any part in this file mess-up? Am I
>>modifying it too quickly, and not giving windows time to update
>>it's disk cache?

>>Thanks for any input into this subject

>>Jim

>>* Sent from RemarQ http://www.remarq.com The Internet's Discussion Network
>*
>>The fastest and easiest way to search and participate in Usenet - Free!



Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?


Quote:
>Or you could have opened the file with another application like
>notepad or word ??
>ronald

>>Jim.

>>Without any code snippets, my first guess would be that you have, possibly
>>inadvertently, opened the file twice in your program. This can sometimes
>>cause 'access denied' problems.

>>Kind regards
>>Ian


>>>Hi, my problem is pretty much what the title says.

>>>When I try to store a record in a file (overwriting some
>>>existing data), I get a file access denied error. The file has
>>>been opened and closed, and not corrupted, so what is the
>>>problem? Is Win98 playing any part in this file mess-up? Am I
>>>modifying it too quickly, and not giving windows time to update
>>>it's disk cache?

>>>Thanks for any input into this subject

>>>Jim

Perhaps the file is read-only? Or, try using filemode := 2 before your
assign statement.

Regards,
Jim Wilson
(Cheap spam protection in place: remove the 'SpamThis'
from my email ID to reply to me personally)



Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?
I am getting the same thing  - a DPMI application ( a BBS door)
compiled with FPC, running under Maximus. Certain files get access
denied, but I *suspect* the BBS is keeping the files locked for some
unknown reason.

How to make life difficult for a programmer.


Quote:



>>Or you could have opened the file with another application like
>>notepad or word ??
>>ronald

>>>Jim.

>>>Without any code snippets, my first guess would be that you have, possibly
>>>inadvertently, opened the file twice in your program. This can sometimes
>>>cause 'access denied' problems.

>>>Kind regards
>>>Ian


>>>>Hi, my problem is pretty much what the title says.

>>>>When I try to store a record in a file (overwriting some
>>>>existing data), I get a file access denied error. The file has
>>>>been opened and closed, and not corrupted, so what is the
>>>>problem? Is Win98 playing any part in this file mess-up? Am I
>>>>modifying it too quickly, and not giving windows time to update
>>>>it's disk cache?

>>>>Thanks for any input into this subject

>>>>Jim

>Perhaps the file is read-only? Or, try using filemode := 2 before your
>assign statement.

>Regards,
>Jim Wilson
>(Cheap spam protection in place: remove the 'SpamThis'
>from my email ID to reply to me personally)



Wed, 18 Jun 1902 08:00:00 GMT  
 Anyone know what can cause a file access denied error (005)?

Quote:

> I am getting the same thing  - a DPMI application ( a BBS door)
> compiled with FPC, running under Maximus. Certain files get access
> denied, but I *suspect* the BBS is keeping the files locked for some
> unknown reason.

> How to make life difficult for a programmer.

If the application that keeps the file locked is a win32 app (either the
FPC program or the bbs thingy), or maybe even a TP program using a DOS7
LFN unit, then keep in mind that windows sometimes keeps files locked
for
several seconds after closure.


Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Runtime error 005 upon RESET of file passed from Windows

2. Error 005

3. runtime error 005

4. runtime error 005

5. RESETting a Directory, File Access Denied!

6. Delphi: File access denied

7. does anyone know how to access SQLCODE in DB

8. Help : Anyone know how to read/write from/into Excel files

9. Using Bookmarks causes File-Errors

10. Win NT and Access denied

11. Access denied #5

 

 
Powered by phpBB® Forum Software