Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Packing in a cursor
Message
 
To
18/02/2003 12:50:26
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00754536
Message ID:
00754614
Views:
14
>Is it possible to completely remove deleted records from a cursor? Pack gives me an error that the operation is not available for a cursor (or something like that).
>
>-The cursor is a view based on a SQL Server 7 view.
>-The user initially sees an empty grid (cursor) for listing selected names (curSelected). They then select names from another list that get added to and removed from the curSelected cursor. Kind of like a mover class, except using grids instead of list controls.
>-I have Set Deleted On and Private DataSession
>-In my grids, I use the RecNo() function to set the backcolor of each row. When there is a deleted record, the two records before and after it display the same backcolor. This is confusing to the user, because they cannot see the deleted record.
>
>Thanks in advance for any help with this!
>
>Don

You cannot pack the cursor by design, so you should use some other way to do what you want. Another way to get rid of the deleted records would be to COPY TO another table where you will get only not deleted records, and then substitute the original view in the grid with this table. But I don't know how it fits into your scheme of things. May be you can use SELECT... INTO TABLE instead of the view and use that table as the grid.recordsource and PACK it as you wish.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform