Q31151: "Path/File Access Error"; OPEN FOR APPEND ACCESS WRITE
Article: Q31151 Product(s): See article Version(s): 3.00 4.00 4.00b 4.50 Operating System(s): MS-DOS Keyword(s): ENDUSER | B_BasicCom | mspl13_basic Last Modified: 28-DEC-1989 A "path/file access error" message occurs when OPENing with FOR APPEND ACCESS WRITE. The error occurs because the designated file needs to be READ in order to be APPENDed. If the file is OPENed with ACCESS WRITE, READing privileges have not been provided. To eliminate the error message, omit the ACCESS clause or change ACCESS WRITE to ACCESS READ WRITE. This information also applies to Microsoft BASIC Compiler Versions 6.00 and 6.00b for MS-DOS and MS OS/2 and to Microsoft BASIC PDS Version 7.00 for MS-DOS and MS OS/2. The following code example demonstrates this behavior: OPEN "test1.dat" FOR APPEND ACCESS WRITE as #1 ' Incorrect. ' OPEN "test1.dat" FOR APPEND ACCESS READ WRITE as #1 ' Correct. FOR k = 1 TO 100 WRITE #1, "hello", k NEXT k close #1
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.