Solved

File open problem

Posted on 1999-01-08
3
146 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
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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

777 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