Cursor Created by User or ODBC Has EXCLUSIVE StatusLast reviewed: April 30, 1996Article ID: Q125732 |
The information in this article applies to:
SUMMARYThe 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 INFORMATIONThis 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 CursorCreate 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" ENDIFThe first message "Cursor is Exclusive" will appear in the WAIT WINDOW.
|
Additional reference words: VFoxWin 3.00 FoxWin FoxDos 2.60a SELECT-SQL
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |