Hi,

I am using SQL to create cursors. How do I setup various indexes for this
cursor like I do for the regular DBF file, so that I can use:

SET ORDER TO xxxx

for the cursor?

Thanks

Zoom

Re: How to create indexes in a SQL cursor? by Rush

Rush
Sat Mar 01 11:40:10 CST 2008

Zoom wrote:
> Hi,
>
> I am using SQL to create cursors. How do I setup various indexes for this
> cursor like I do for the regular DBF file, so that I can use:
>
> SET ORDER TO xxxx
>
> for the cursor?
>
> Thanks
>
> Zoom
>
>

Same as you would for a table:

SELECT Field1, Field FROM MyTable INTO CURSOR MyCursor
SELECT MyCursor
INDEX ON Field1 TAG Field1
SET ORDER TO Field1

- Rush

Re: How to create indexes in a SQL cursor? by Man-wai

Man-wai
Sat Mar 01 23:02:14 CST 2008

> SELECT Field1, Field FROM MyTable INTO CURSOR MyCursor
> SELECT MyCursor
> INDEX ON Field1 TAG Field1
> SET ORDER TO Field1

And if you need to alter the cursor,
remember to create an index before re-opening
the cursor readwrite. Not sure whether latest
VFP had changed this .....

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.24.3
^ ^ 13:00:01 up 3 days 22:48 0 users load average: 0.48 0.15 0.04
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/

Re: How to create indexes in a SQL cursor? by Rush

Rush
Sun Mar 02 01:34:47 CST 2008

Man-wai Chang ToDie wrote:
>> SELECT Field1, Field FROM MyTable INTO CURSOR MyCursor
>> SELECT MyCursor
>> INDEX ON Field1 TAG Field1
>> SET ORDER TO Field1
>
> And if you need to alter the cursor,
> remember to create an index before re-opening
> the cursor readwrite. Not sure whether latest
> VFP had changed this .....
>

And the reason is . . . ?

- Rush

Re: How to create indexes in a SQL cursor? by Man-wai

Man-wai
Sun Mar 02 04:19:12 CST 2008

>> And if you need to alter the cursor,
>> remember to create an index before re-opening
>> the cursor readwrite. Not sure whether latest
>> VFP had changed this .....
> And the reason is . . . ?

Try it on Foxpro 2.6, if you still have it running. :)

--
@~@ Might, Courage, Vision, SINCERITY.
/ v \ Simplicity is Beauty! May the Force and Farce be with you!
/( _ )\ (Xubuntu 7.04) Linux 2.6.24.3
^ ^ 18:18:01 up 4 days 4:06 0 users load average: 0.07 0.06 0.02
? ? (CSSA):
http://www.swd.gov.hk/tc/index/site_pubsvc/page_socsecu/sub_addressesa/