Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create a cursor with predefined structure
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00562758
Message ID:
00565937
Views:
12
>Larry,
>
>[snip]
>In VFP 7:
>select * from mytable where 1 = 0 into cursor mycursor readwrite
>
>IN VFP 6:
>select * from mytable where 1 = 0 into cursor c_temp nofilter
>use dbf('c_temp') again alias mycursor in 0
>select mycursor
>use in c_temp
>
>This gives you the structure with indexes.
>
>[end snip]
>
>OK, I'll bite. The SQL SELECT statement with a simple WHERE filter creates a pointer into the source cursor. The "ReadWrite" VFP7 clause and the "USE... AGAIN... IN 0" VFP6 commands create a new file on disk with the same header.
>
>How do the indexes get carried along?
>
>Actually, I just gave this a shot and the index did NOT come along. Am I missing something?
>

Hi Thom,
Yes, you are missing that when typing my brain set some commands to my fingers that never got processed. Insert out after the with. :-)
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform