Solved

deny a file access

Posted on 2001-09-13
7
190 Views
Last Modified: 2010-05-02
is it possible to deny a file access like we see in opened access database files .
can we implement the same idea to protect any file
thanks
jophie
0
Comment
Question by:jofykuttan
[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
7 Comments
 
LVL 5

Accepted Solution

by:
rkot2000 earned 50 total points
ID: 6480180
you can try to use open file


Enables input/output (I/O) to a file.

Syntax

Open pathname For mode [Access access] [lock] As [#]filenumber [Len=reclength]

lock - Optional. Keyword specifying the operations restricted on the open file by other processes: Shared, Lock Read, Lock Write, and Lock Read Write.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6481990
If you are using NTFS then you can set permissions on the file which will deny access. Otherwise you have to open the file exclusively as suggested.
0
 

Author Comment

by:jofykuttan
ID: 6622093
dear,
in fact
what i asked is
to deny access to virtually any file
like we see in Access

and is it possible it implement that logic in VB
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 49

Expert Comment

by:DanRollins
ID: 7208363
jofykuttan, an EE Moderator will delete this for you.
Moderator, my recommended disposition is:

    DELETE this question.

DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:rkot2000
ID: 7209165
Access denies access to this file because the file is open for io operations.
Opening any other file will do the same.
So I have the correct answer.
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7224049
Moderator, my recommended disposition is:

   accept rkot2000's comment as an answer

DanRollins -- EE database cleanup volunteer
0
 
LVL 5

Expert Comment

by:Netminder
ID: 7241192
Per recommendation, force-accepted.

Netminder
CS Moderator
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

752 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