Hey Andrew,
I was indexing to an IDX file, not a CDX tag. Indexing to an IDX always works.
>The first
INDEX ON command works fine, subsequent calls (with or without the ADDITIVE keyword) generate error 1718 - file is read only.
>
>The following code demonstrates the point:
>
select * from userview into cursor cuUser
>index on name tag name
>index on initials tag initials addi
>index on initials tag initials
>use dbf('cuUser') again in 0 alias cuUser2
>select cuUser2
>index on name tag name
>index on initials tag initials addi
>Cheers,
>
>Andrew
>
>
>
>>Hi Nadya,
>>
>>I can SELECT * FROM mytable INTO CURSOR mycursor: SELECT mycursor: INDEX ON blah TO blah without issue. Am I missing something?
>>
>>
>>> Your cursor has to be updatable in order to create index (index on command).
>>> To make cursor updatable you can either create it in Init method of your form (or the grid) (Create Cursor command) or use dbf('myCursor') again alias myUpdatableCursor or wait till VFP 7.0, where we will have ReadWrite option :)
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05