Microsoft KB Archive/125732

= Cursor Created by User or ODBC Has EXCLUSIVE Status =

Article ID: 125732

Article Last Modified on 11/17/2003

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition
 * Microsoft FoxPro 2.6a Standard Edition

-



This article was previously published under Q125732



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 query words: VFoxWin FoxWin FoxDos SELECT-SQL locked

Keywords: KB125732

-

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

© Microsoft Corporation. All rights reserved.