Cursor Created by User or ODBC Has EXCLUSIVE Status

ID: Q125732

2.60a 3.00 WINDOWS kbprg

The information in this article applies to:

  • Microsoft Visual FoxPro for Windows, version 3.0 - Microsoft FoxPro for Windows, version 2.6a - Microsoft FoxPro for MS-DOS, version 2.6a

SUMMARY

The CREATE CURSOR command opens a temporary, memory-based table with EXCLUSIVE status. This command may be employed by the programmer or the user, or it may be generated by the RQBE tool when the user selects the output destination as a cursor with a particular name or when the ODBC SELECT generates a result-set cursor.

MORE INFORMATION

This is important when the status of EXCLUSIVE bears on the behavior of the cursor, its data, or the data of related tables when used with the cursor's data in a browse.

The cursor is a temporary object uniquely located in the workarea of the user whose SELECT-SQL created it. Hence, it is not seen by other workstations on the network. By default, it is exclusive to the workstation upon which it resides. This is demonstrated by example in this article.

The use of data from the cursor combined with data from other tables in a multiple-column browse causes editing of any of the data in the browse to be disabled. When data from non-cursor fields in the browse is edited, FoxPro issues a "Record is not locked" message and does not post the change to the record from which the field in the browse is displayed.

Example to Demonstrate Status of the Cursor

Create and run the following program, named TEST.PRG:

   CREATE CURSOR test1 (field1 c(10))       && Field length is arbitrary
   SELECT test1
   IF UPPER(SYS(2011)) == 'EXCLUSIVE'
      WAIT WINDOW "Cursor is Exclusive"
   ELSE
      WAIT WINDOW "Cursor is not Exclusive"
   ENDIF

The first message "Cursor is Exclusive" will appear in the WAIT WINDOW.

Additional reference words: VFoxWin 3.00 FoxWin FoxDos 2.60a SELECT-SQL locked KBCategory: kbprg KBSubcategory: FxprgSql

Keywords          : FxprgSql 
Version           : 2.60a 3.00
Platform          : WINDOWS


Last Reviewed: May 1, 1996
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.