PACKING a cursor file 
Author Message
 PACKING a cursor file

Hello,

I am wondering if it is possible to PACK a cursor file. I tried doing it and
got a message stating that such operation is not valid for the cursor file.

Thanx



Sun, 29 Aug 2004 09:13:45 GMT  
 PACKING a cursor file
No, you can't. But there is a work around. VFP Help on PACK:
<vfp_help>
When you use PACK, Microsoft Visual FoxPro copies all records not marked for deletion to a temporary table. After PACK is finished
executing, Visual FoxPro deletes the original table from disk and renames the temporary table with the original table name. If you
press ESC to interrupt PACK, the temporary table is deleted, and the original table remains unchanged. The original table is also
recovered if you run out of disk space while PACK is executing.
</vfp_help>

So, you can write your own pack routine, similar to this:

create cursor tmp (cfield C(1))
append blank
delete
copy to test for not dele()
use test alias tmp

Just remember that if you COPY TO another file, you'll loose long file names unless you include the DATABASE argument.

--
Eric den Doop
www.foxite.com - The Home Of The Visual FoxPro Experts - Powered By VFP7

Quote:

> Hello,

> I am wondering if it is possible to PACK a cursor file. I tried doing it and
> got a message stating that such operation is not valid for the cursor file.

> Thanx



Sun, 29 Aug 2004 14:30:37 GMT  
 PACKING a cursor file
Eric,

Thanx a lot....... :)


Quote:
> Hello,

> I am wondering if it is possible to PACK a cursor file. I tried doing it
and
> got a message stating that such operation is not valid for the cursor
file.

> Thanx



Mon, 30 Aug 2004 11:35:34 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Cursors not packing, cursors vs arrays

2. Packing a Cursor

3. Packing a cursor ?

4. Pack a cursor ?

5. pack temporary cursor with cdx

6. Why is packing a cursor and invalid operation?

7. Pack Memo or Pack causes Trigger Failed

8. File Access Denied Error when trying to pack tables on Networks

9. Auto timer to pack files

10. Packing file in multiuser environment

11. .BAK file - packing - 2.6

12. PACKing files using ODBC

 

 
Powered by phpBB® Forum Software