Bookshelf Home | Contents | Index | PDF | ![]() ![]() |
Siebel VB Language Reference > Methods Reference for Siebel VB > File Control Methods > Lock File MethodThe Lock File method controls access to an open file. It does not return a value. FormatLock [#]filenumber[, [start] [To end]] The following table describes the arguments that you can use with this method. Specifying the Start Argument and End ArgumentThe Lock File method locks the file according to the following modes:
Removing LocksYou must use the Lock File method and the Unlock File method in pairs to remove a lock, and the arguments that you use with these methods must be identical. For more information, see Unlock File Method. You must configure Siebel VB to remove a lock on an open file before it closes the file. If you do not do this, then unpredictable results might occur. ExampleIn the following example, if the file is already in use, then this code locks the file that other users on a network share. The CreateFile subroutine creates the file that the main subroutine uses: (general) (declarations) Sub CreateFile Sub Button_Click |
![]() ![]() |
Siebel VB Language Reference | Copyright © 2017, Oracle and/or its affiliates. All rights reserved. Legal Notices. | |