Q125732: Cursor Created by User or ODBC Has EXCLUSIVE Status
Article: Q125732
Product(s): Microsoft FoxPro
Version(s): MS-DOS:2.6a; WINDOWS:2.6a,3.0
Operating System(s):
Keyword(s):
Last Modified: 12-FEB-2000
-------------------------------------------------------------------------------
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 query words: VFoxWin FoxWin FoxDos SELECT-SQL locked
======================================================================
Keywords :
Technology : kbVFPsearch kbAudDeveloper kbFoxproSearch kbZNotKeyword3 kbFoxPro260aDOS kbFoxPro260a kbVFP300
Version : MS-DOS:2.6a; WINDOWS:2.6a,3.0
=============================================================================
THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.
Copyright Microsoft Corporation 1986-2002.