Microsoft KB Archive/100443: Difference between revisions

From BetaArchive Wiki
(importing KB archive)
 
m (Text replacement - """ to """)
 
Line 27: Line 27:
   USE customer.dbf SHARED
   USE customer.dbf SHARED
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
       WAIT WINDOW "Database opened as Exclusive"
       WAIT WINDOW "Database opened as Exclusive"
   ELSE
   ELSE
       WAIT WINDOW "Database opened as Shared"
       WAIT WINDOW "Database opened as Shared"
   ENDIF
   ENDIF


   USE customer.dbf EXCLUSIVE
   USE customer.dbf EXCLUSIVE
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
       WAIT WINDOW "Database opened as Exclusive"
       WAIT WINDOW "Database opened as Exclusive"
   ELSE
   ELSE
       WAIT WINDOW "Database opened as Shared"
       WAIT WINDOW "Database opened as Shared"
   ENDIF
   ENDIF
</pre>
</pre>

Latest revision as of 12:29, 19 July 2020

Determining the Exclusive Status of an Opened Database

ID: Q100443

2.50 2.50a | 1.02 2.00 2.50 2.50a WINDOWS | MS-DOS kbprg

The information in this article applies to:

  • Microsoft FoxPro for Windows, versions 2.5 and 2.5a
  • Microsoft FoxPro for MS-DOS, versions 1.02, 2.0, 2.5, and 2.5a

SUMMARY

Microsoft FoxPro has no function dedicated to determining the exclusive status of an opened database. Whether or not a particular database has been opened as exclusive or shared can be determined with the SYS(2011) function.

MORE INFORMATION

The SYS(2011) function is used to determine if the current record is locked. When used on a database that has been opened as exclusive, it will indicate that.

The following program demonstrates the use of the SYS(2011) function to determine if a database was opened as exclusive:

   SET EXCLUSIVE OFF
   SELECT 0

   USE customer.dbf SHARED
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
      WAIT WINDOW "Database opened as Exclusive"
   ELSE
      WAIT WINDOW "Database opened as Shared"
   ENDIF

   USE customer.dbf EXCLUSIVE
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
      WAIT WINDOW "Database opened as Exclusive"
   ELSE
      WAIT WINDOW "Database opened as Shared"
   ENDIF

Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.x KBCategory: kbprg KBSubcategory: FxprgGeneral

Keywords          : FxprgGeneral 
Version           : 2.50 2.50a | 1.02 2.00 2.50 2.50
Platform          : MS-DOS WINDOWS

Last Reviewed: November 22, 1995
© 1999 Microsoft Corporation. All rights reserved. Terms of Use.