Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 155
  • Last Modified:

File open problem

How can I open a typed file on a read-only drive and read it ? (I tried with the assignfile-reset methods but an error like "file access refused" happens, even if I only want to read it.) HELP!!
0
logosapience
Asked:
logosapience
1 Solution
 
MadshiCommented:
Hmm. You could use
  "TFileStream.Create('file.ext',fmOpenRead or fmShareDenyNone)"
However, you said "typed file", so I don't know if this helps...

Regards, Madshi.
0
 
rwilson032697Commented:
Set Filemode to fmOpenRead before calling ResetFile. Remember to set it back again once you are finished.

CHeers,

Raymond.
0
 
logosapienceAuthor Commented:
thanx very much
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

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

Tackle projects and never again get stuck behind a technical roadblock.
Join Now