Microsoft KB Archive/68021

= LOCK May Fail to Properly Return Error After CHAIN Under OS/2 =

Article ID: 68021

Article Last Modified on 10/20/2003

-

APPLIES TO


 * Microsoft BASIC Professional Development System 7.0
 * Microsoft BASIC Professional Development System 7.1

-



This article was previously published under Q68021



SYMPTOMS
Under MS OS/2, the following program demonstrates how a LOCK statement can fail to properly give a &quot;Permission Denied&quot; error for a locked record in a file kept open across a CHAIN. This problem does not occur under MS-DOS.



STATUS
Microsoft has confirmed this to be a bug in Microsoft Basic Professional Development System (PDS) versions 7.00 and 7.10 for MS OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



TEST01.BAS
10 ON ERROR GOTO 70 20 OPEN &quot;pippo&quot; FOR RANDOM ACCESS READ WRITE SHARED AS #1 LEN=128 30 LOCK 1, 1 40 CHAIN &quot;TEST02&quot; 70 PRINT ERR; ERL 80 END

TEST02.BAS
10 ON ERROR GOTO 70 20 LOCK 1, 1 30 END 70 PRINT ERR; ERL 80 END Compile and link the above programs as follows: BC /X/LP test01; LINK test01; BC /X/LP test02; LINK test02; Under MS-DOS, the second (CHAINed) program correctly returns a &quot;Permission Denied&quot; error (error code 70) for the LOCK statement; however, under OS/2, this program fails to give an error.

Additional query words: BasicCom SR# S901205-16 buglist7.00 buglist7.10

Keywords: KB68021

-

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

© Microsoft Corporation. All rights reserved.