Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!alberta!sask!lowey From: lowey@sask.UUCP Newsgroups: comp.lang.pascal,comp.sys.ibm.pc Subject: HELP-Read only files from Turbo Pascal Message-ID: <760@sask.UUCP> Date: Wed, 3-Jun-87 21:43:46 EDT Article-I.D.: sask.760 Posted: Wed Jun 3 21:43:46 1987 Date-Received: Sat, 6-Jun-87 05:45:58 EDT Organization: University of Saskatchewan Lines: 34 Keywords: turbo pascal bugs read-only Xref: utgpu comp.lang.pascal:143 comp.sys.ibm.pc:4011 Hi, I have a problem that I hope someone can help me with. I'm trying to write a Turbo Pascal program to work on Local Area Networks. This program needs to access files stored on the network. For security reasons these files are marked READ ONLY. The problem is that Turbo Pascal won't see a file if it is marked as read only. Logically what it should do is open a file ok, allow you to read from the file, then give IO error number 03: "File not open for output" if the program tries to write to the file. Instead, I get IO error 01: "File does not exist" when I attempt to RESET the file. I assume the problem occurs because Turbo version 3.01A (which I'm using) was written for MS-DOS 2.0, which did not have file locking capabilites. This implies that I have to use MS-DOS 3.0 or higher function calls to open the files. The trick is opening the files in such a way that I can use the Turbo Pascal READ and READLN procedures to get information from the files. Has anyone run into this problem before, and more important, does anyone have a solution? Many Thanks. ______________________________________________________________________________ | Kevin Lowey |The above is the personal opinion of Kevin | | University of Saskatchewan |Lowey. It does not reflect the position of| | Computing Services |the University of Saskatchewan in any way. | | SaskTel: (306) 966-4826 | | | Bitnet:LOWEY@SASK. (preferred) |I am in no way affiliated with any of the | | UUCP: ihnp4!sask!lowey.uucp |above mentioned companies other than U of S| |________________________________|___________________________________________|