Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can you Pack a Cursor
Message
From
07/11/2012 10:49:12
 
 
To
06/11/2012 13:34:46
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01556496
Message ID:
01556610
Views:
63
Mike,

Of course you are correct the use of m.Dot and macro in this way is incorrect. Thanks for pointing.
The use of the Where clause is indeed discutable.

The main point of my entry was to inform that a cursor can be 'packed' by reconstructing the same cursor from itselve with condition only the undeleted rec's.
Hope that at least that was correct.

And yes I normaly never set Deleted to OFF, although there are situations, even with an extra flag field lDeleted it can be handy.

Best regards,

Koen

>>
>>Gerad,
>>
>>Try
>>
>>
>>lcDeleted = Set("DELETED")
>>SET DELETED ON
>>SELECT * FROM myCursor WHERE !DELETED INTO CURSOR myCursor NOFILTER READWRITE
>>SET DELETED &m.lcDeleted
>>
>>
>>Regards,
>>
>>Koen
>
>Hi Koen
>
>You cannot use mdot with macro-substitution like that. Also once you have enabled SET DELETED ON, there is no need for the where !deleted. Furthermore, DELETED() is a function, and I'd never use a function that takes an alias in SQL. I'd write it like this...
>
>
lcDeleted = Set("DELETED")
>SET DELETED ON
>SELECT * FROM myCursor INTO CURSOR myCursor NOFILTER READWRITE
>IF m.lcDeleted = "OFF"
>  SET DELETED OFF
>ENDIF
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform