• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 280
  • Last Modified:

In Unlock necessary when closing locked files.

I'm writing a VB4 CGI chat program and for the first time felt it necessary to lock files when reading and writing to them. When I lock my files I lock them in the Open statement i.e.

Open IndexFile For Random Lock Read Write As #FN.

When I was looking through the help files I came across the Lock # and Unlock # commands for locking individual records or bytes in a random access or binary file and noticed a warning that closing the file without using the Unlock # command could cause unpredictable results. Dose this apply only to files with individual records locked with the Lock # command after the open statement or should I unlock any files opened with the locking done in the Open statement as well?
0
grobin
Asked:
grobin
1 Solution
 
y96andhaCommented:
This only applies to files locked with the Lock # command, not to files locked with the Open statement.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now