Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to index results of query
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00079892
Message ID:
00079896
Views:
44
>Here's the problem: I have an SQL statement for which I must index the results.
>
>If I just SELECT INTO CURSOR mycursor, and attempt to index, I get a 'mytable is readonly' error. (Mytable is the underlying table from which the SELECT was querying).
>
>I don't want to make the cursor update changes to the base table, so the old USE DBF('mycursor') AGAIN ALIAS whatever doesn't fit the bill.
>
>I have attempted to SELECT into an array, and then append the results to a cursor, and then index. This works until the query returns a large number of records and then I get 'Too many variables'
>
>In other situations, I have just used a view and indexed the results of the view, but this statement is too dynamic to use a view.
>
>How do I handle this?

Howz about using the NOFILTER clause of the select to garuntee the disk presence of a result. It sounds as if your select is simple enough for the fox query optimizer to issue a simple USE AGAIN. This is indicated by your problem
of a 'mytable is readonly' try the NOFILTER and the USE (DBF('myresult')) then index
JJ-
One man gathers what another man spills.......
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform