Home > Archive > FoxPro database connector > September 2005 > DBF Files DELETED When PACK









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DBF Files DELETED When PACK
DrWai

2005-09-15, 3:25 am

I found that VFP 6.0 would delete 'some' DBF files when PACK statement
is executed. Then, "File does not exists" error occurs.

However, this problem does not delete all my DBF files but just some of
them. I still cannot find its pattern.


Any idea?

Thanks.

Paul

2005-09-15, 7:24 am

DrWai wrote:
> I found that VFP 6.0 would delete 'some' DBF files when PACK statement
> is executed. Then, "File does not exists" error occurs.
>
> However, this problem does not delete all my DBF files but just some of
> them. I still cannot find its pattern.
>
>
> Any idea?


Well a PACK does something like this:

COPY TO tempdbf FOR NOT DELETED()
DELETE originaldbf
RENAME tempdbf TO originaldbf

Could it be that there is something odd about your temp folder?

--
Paul

Dan Freeman

2005-09-15, 11:24 am

Probably a user rights issue. There is some deleting and recreating going on
during a pack, but only if the table is large enough to warrant it IIRC.

Dan

Paul wrote:
> DrWai wrote:
>
> Well a PACK does something like this:
>
> COPY TO tempdbf FOR NOT DELETED()
> DELETE originaldbf
> RENAME tempdbf TO originaldbf
>
> Could it be that there is something odd about your temp folder?



DrWai

2005-09-27, 1:24 pm

Thanks for your reply. I have already find the pattern...for example:

- Create a table at c:\temp1\temp2\abc.dbf
- Append a record and then delete it
- Change the attribute of folder temp2 to invisible (hidden)
- Open the table again and then PACK
- Error "File Does Not Exist" should be prompted now

Paul, you are right...I found the temp file survived in the temp
folder. But, the problem is that PACK could not restore/rename the temp
file back to original, if ITS PARENT FOLDER IS HIDDEN.

Any suggestion? Or I need to write PACK step by step?
^^"

DrWai

2005-09-27, 1:24 pm

As I posted in this forum under another topic, FoxPro seems have
problem on handling hidden file...try this

- Create a plain text file c:\temp\abc.txt
- Set it to invisible
- Type command SET TEXTMERGE ON
- Type command SET TEXTMERGE TO c:\temp\abc.txt ADDITIVE
- Access denied error occur

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com