Solved

In Unlock necessary when closing locked files.

Posted on 1997-08-16
1
274 Views
Last Modified: 2008-03-06
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
Comment
Question by:grobin
1 Comment
 
LVL 5

Accepted Solution

by:
y96andha earned 50 total points
ID: 1431066
This only applies to files locked with the Lock # command, not to files locked with the Open statement.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question