Microsoft KB Archive/120515

= VB Application Incorrectly Indicates Lost Data Record =

Article ID: 120515

Article Last Modified on 11/1/2006

-

APPLIES TO


 * Microsoft Windows NT Advanced Server 3.1
 * Microsoft Windows NT Workstation 3.1

-



This article was previously published under Q120515



SYMPTOMS
When 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.



CAUSE
Although 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.



RESOLUTION
If 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 query words: wfw wfwg prodnt 3.10

Keywords: KB120515

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.