Solved

File open problem

Posted on 1999-01-08
3
150 Views
Last Modified: 2010-04-06
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
Comment
Question by:logosapience
[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
3 Comments
 
LVL 20

Expert Comment

by:Madshi
ID: 1355264
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
 
LVL 12

Accepted Solution

by:
rwilson032697 earned 50 total points
ID: 1355265
Set Filemode to fmOpenRead before calling ResetFile. Remember to set it back again once you are finished.

CHeers,

Raymond.
0
 
LVL 1

Author Comment

by:logosapience
ID: 1355266
thanx very much
0

Featured Post

Technology Partners: 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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

687 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