Difference between revisions of "LOCK (access)"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m (Created page with 'A LOCK access READ or WRITE can be specified in a file OPEN statement in a network environment(DOS 3.1 or higher).')
 
imported>Clippy
m
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
A LOCK access READ or WRITE can be specified in a file [[OPEN]] statement in a network environment(DOS 3.1 or higher).
A LOCK access READ or WRITE can be specified in a file [[OPEN]] statement in a network environment(DOS 3.1 or higher).
''Valid Options:''
*Default: When LOCK is not specified in an [[OPEN]] statement, all other processes are denied file access.
*SHARED: When specified, any file can be READ or WRITE accessed by other procedures.
*LOCK READ: When specified, read access is denied to other file procedures.
*LOCK WRITE: When specified, write access is denied to other file procedures.
*LOCK READ WRITE: When specified any access is denied to other file procedures.
''Limitations:''
* Requires that the DOS '''SHARED.EXE''' program be run for QBasic to use networking access modes.
*If another process already has access to a specified file, program access is denied for that file OPEN statement. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error.
''See also:'' [[LOCK]] (statement), [[ACCESS]] (clause), [[ON ERROR]]
==Navigation:==
[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]
[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]

Latest revision as of 19:01, 27 February 2010

A LOCK access READ or WRITE can be specified in a file OPEN statement in a network environment(DOS 3.1 or higher).


Valid Options:

  • Default: When LOCK is not specified in an OPEN statement, all other processes are denied file access.
  • SHARED: When specified, any file can be READ or WRITE accessed by other procedures.
  • LOCK READ: When specified, read access is denied to other file procedures.
  • LOCK WRITE: When specified, write access is denied to other file procedures.
  • LOCK READ WRITE: When specified any access is denied to other file procedures.


Limitations:

  • Requires that the DOS SHARED.EXE program be run for QBasic to use networking access modes.
  • If another process already has access to a specified file, program access is denied for that file OPEN statement. A "Permission Denied" error 70 will be returned. A network program must be able to handle a denial of access error.


See also: LOCK (statement), ACCESS (clause), ON ERROR



Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage