VB Application Incorrectly Indicates Lost Data RecordLast reviewed: January 31, 1995Article ID: Q120515 |
The information in this article applies to:
SYMPTOMSWhen Visual Basic applications do not include proper error handling when performing database record processing, the applications may report null records and the following error message appears:
Error #70: ....File Locked.In this case, Windows for Workgroups workstations that are reading records to a database stored on a Windows NT Advanced Server system may incorrectly report lost records. Record write failures may also lose records in a similar way.
CAUSEAlthough the server reports a locking violation to the workstation, the application does not handle the error. Null record values are returned during a read failure. Data being written may appear to be lost if the write fails to complete. Protocol analysis will show that the Windows NT Advanced Server system returns a server message block (SMB) locking violation.
RESOLUTIONIf the application receives a locking violation, the application must handle this error by backing off and waiting for a period of time. This period of time must be determined to be reasonable based on a normal period that a user will require exclusive access to a data record. After waiting, the application can then attempt to retry the operation. The application backs off and retries the operation until it is successful, or it returns an appropriate error message to the user indicating that the record is not accessible at this time. Proper error handling is critical to guaranteeing successful data record reading and writing.
|
Additional reference words: wfw wfwg prodnt 3.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |