Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Indexing SQL results
Message
From
09/09/1997 10:42:16
 
 
To
09/09/1997 10:32:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00049056
Message ID:
00049141
Views:
58
>>| cursor. Issuing the query and changing the recordsource to the cursor are
>>
>>| easy enough, but the indexing is posing a problem, because as far as I
>>| know, you can only index tables and views. Is the only way to do this to
>>
>>SELECT ... INTO CURSOR cMyCursor
>>
>>USE DBF('cMyCursor') IN 0 Alias cMyTemporaryTable AGAIN
>>
>>USE IN cMyCursor
>>
>>SELECT cMyTemporaryTable
>>
>>INDEX ON ... TAG ...
>>
>>The file name of the table is smth like 348745548.tmp. You don't
>>have to worry about that. The index file willhave the same name.
>>
>>Sorin
>
>Sorin- thanks for your reply, this is what I needed. (I think). I'm a little unclear on a thing or 2 however...
>What is different about the temporary when it is first created as opposed to after being used again? How does VFP decide which ones can be indexed? I guess my question is. technically speaking. what is the difference between a cursor and a temporary table?

Table is dbf file, cursor is tmp file stored in Temporary Files folder. When you close a cursor it's deleted automatically, temp table should be deleted explicitly. Cursor created by SELECT-SQL is read-only and must be opened in another work area (like Sorin suggested) to be modified, indexed, etc. If you created cursor using CREATE CURSOR, it can be modified immediately.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform