Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Seek record in cursor
Message
From
30/08/2000 09:32:00
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00410485
Message ID:
00410681
Views:
22
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  && no problem
>index on initials tag initials addi  && error
>index on initials tag initials  && error
>use dbf('cuUser') again in 0 alias  cuUser2
>select cuUser2
>index on name tag name  && prompted to overwrite name tag
>index on initials tag initials addi  && no problem
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform