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
Solved

deny a file access

Posted on 2001-09-13
7
188 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
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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

765 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