PRB: INDEX ON produces 'File is read-only' Error with Cursor

ID: Q129920

2.60a 3.00 | 2.60a

WINDOWS    | MACINTOSH
kbprg kbprb

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 Macintosh, version 2.6a

SYMPTOMS

When attempting to create an INDEX for a read-only cursor, you receive this error:

   File is read-only

RESOLUTION

Specify an .IDX file for the tags to be added to. For example, issue the following commands to create the two tags without yielding the error message:

   USE tutorial\customer
   SELECT * FROM customer WHERE state = 'CA' INTO CURSOR test
   INDEX ON zip+city TAG zip_city OF tutorial\testzip.idx

Because you can have only one IDX file assoicated with a cursor open at a time, you need to recreate the new index as needed with these commands:

   SET ORDER TO
   INDEX ON cno+company TO c:\fpw26\test2.idx

STATUS

This behavior is by design.

Additional reference words: FoxWin FoxMac 2.60a 3.00 KBCategory: kbprg kbprb KBSubcategory: FxotherGeneral

Keywords          : FxotherGeneral 
Version           : 2.60a 3.00 | 2.60a
Platform          : MACINTOSH WINDOWS


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