Packing a Cursor 
Author Message
 Packing a Cursor

I have created a temporary table (a cursor) and would like to
permanently remove unwanted records.

However the PACK command fails ("Invalid operation fpr the cursor").  Is
there an equivalent function for a cursor, or do I need to set different
options.  Or are deleted records removed automatically for a cursor?

Will be happy to be pointed to the relevant documentation !

Thanks.  Andrew

--
Posted via http://www.*-*-*.com/



Mon, 05 Sep 2005 08:46:06 GMT  
 Packing a Cursor
Hello, AMozley!
You wrote  on Thu, 20 Mar 2003 00:46:06 +0000:

 A> However the PACK command fails ("Invalid operation fpr the cursor").  Is
 A> there an equivalent function for a cursor, or do I need to set different
 A> options.  Or are deleted records removed automatically for a cursor?

Doesn't SET DELETED ON work for you? You're correct: PACK doesn't work with
cursors, but why do you need to PACK it? If SET DELETED ON is not an option
for you, then see if this helps:

SELECT original_cursor
COPY TO temp_table FOR NOT DELETED()
ZAP
APPEND FROM temp_table
* don't make a mess of your user's hard disk
DELETE FILE temp_table.dbf
IF FILE("temp_table.fpt")
    DELETE FILE temp_table.fpt
ENDIF
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8



Mon, 05 Sep 2005 21:10:40 GMT  
 Packing a Cursor

Quote:
>>> Hello, Johan!

Mmm now that is weird, my OE account settings have suddenly changed? Have
you ever seen that before?
---
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP8


Mon, 05 Sep 2005 21:19:59 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Packing a cursor ?

2. Pack a cursor ?

3. pack temporary cursor with cdx

4. Why is packing a cursor and invalid operation?

5. PACKING a cursor file

6. Cursors not packing, cursors vs arrays

7. Pack Memo or Pack causes Trigger Failed

8. Cursor, as in the text cursor.

9. copy data from cursor to cursor

10. Cursors to ADO RS's to cursors

11. VFP & Service Pack 3

12. NT Server & FoxDos 2.6 packing dbf problem

 

 
Powered by phpBB® Forum Software