Solved

Run time error 70: Permission denied

Posted on 2002-03-20
10
1,379 Views
Last Modified: 2011-09-20
Dear Experts:

i have a VB program it will perform create txt file and copy image file function using filesystem object.
however the program will show me the following error message:

 "Run-time error '70'

 Permission denied"

i had checked all the files and folders, they are not read only.
and i logon as admin with full control of the machine.

what could be the cause of this problem and the solution?
Thanks in advance for helping me to solve this problem.
0
Comment
Question by:wolvering
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Expert Comment

by:nahumd
ID: 6884891
Which line causes the error ?
0
 

Author Comment

by:wolvering
ID: 6884904
not sure,i run the exe file in NT.  I think it is the WinNT configuration problem.  what setting could cause this error to occur? as i run the program smoothly in win98.
0
 
LVL 2

Expert Comment

by:nahumd
ID: 6884909
Try to create this file manually in the destination directory and see it you can do it.

0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 

Author Comment

by:wolvering
ID: 6884913
Yes i can create files or folder manually
0
 
LVL 2

Expert Comment

by:nahumd
ID: 6884926
Well first we must identify the line code that caused the error.
You can either install vb there, or use error handling in your code to identify it, or try to remove the suspected offending line and see if it removes the error.
0
 

Author Comment

by:wolvering
ID: 6884931
i am sure it is not the problem of program code because i tested the program in different OS.  this problem happen only in that particular machine with NT installed.
so i am quite sure it is the NT setting problem instead of program code.
0
 
LVL 9

Accepted Solution

by:
Valliappan AN earned 100 total points
ID: 6884990
Check if you have something to do with Scripting Access. Hope your system can control if Windows Scripting is allowed or not. Since, FSO needs Windows Scripting to be in Windows, to run through.

If you'd like to look at:
http://www.sarc.com/avcenter/venc/data/win.script.hosting.html

Cheers
0
 

Expert Comment

by:sweetpillow
ID: 6885086
Hi,

   Here is the reason why this error come out :

You tried to write to a write-protected disk, to access a locked file, or to use UNLOCK on a file that was not locked.

POSSIBLE SOLUTIONS:

Remove write-protection from the disk.

Unlock the file before attempting access.

Lock the file before trying to unlock it.

Remove the UNLOCK statement.

Insert error checking to test for disk/file status before attempting WRITE or UNLOCK operations.

Cheers,
Sweetpillow :)
0
 

Expert Comment

by:GuruVB
ID: 6885174
Try using "Name" function from VB. Before you try make sure that you have closed the file.

I hope this will help you
0
 
LVL 5

Expert Comment

by:RainUK
ID: 6889046
Are you using APIs to access the file?
0

Featured Post

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 7 hours left to enroll

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question