Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: FPT corruption
Thread ID: 78600 Message ID: 78652 # Views: 2 # Ratings: 0
Version: Not Applicable Category: Databases, Tables and SQL Server
Date: Thursday, October 06, 2005 3:04:56 PM         
   


> Colleagues:
>
> What we found today might be an answer - if even only partial - to the problem in subject.
>
> Suppose, you have a table with DBF, CDX and FPT files. Suppose, all three have Read-Only attribute (say, copied onto an HDD from a CD or a DVD). Now, you reset DBF file's attribute to NORMAL (programmatically, with SetFileAttributes(lpFileName, dwFileAttributes) API function), and then try to open the table in exclusive mode - opens OK.
>
> You close it... and then try to open it again in exclusive mode - "Error 41: Memo file [name] is missing or is invalid" message pops up.
> Or, the error occurs when you try to APPEND or INSERT to this table.
>
> OTOH, if all three parts of the table are made NORMAL prior to opening the DBF in exclusive mode - this corruption doesn't happen.
>
> Hence the questions:
>
> 1. What is the connection between DBF and FPT files for the table? Does DBF's header store the attribute of the corresponding FPT file, or is it something else?

Can you walk with one foot if another is blocked somehow?
Sure two files interact with each other when dbf is in use. And if they do not have the very same permissions, then the things may go wrong.
You may review the file structures as they are in VFP help to get more on this. I never heard about experiments like you did, and I cannot imagine the situation when it is needed.

>
> 2. Could it be the cause of FPT corruption that DBF is NORMAL and FPT is READONLY?

Yes, as you can see.

>
> TIA!
>
> Regards,
>
> Ilya


ENTIRE THREAD

FPT corruption Posted by Ilya Rabyy @ 10/5/2005 11:39:20 PM
RE: FPT corruption Posted by Yuri Rubinov @ 10/6/2005 3:04:56 PM
RE: FPT corruption Posted by Ilya Rabyy @ 10/6/2005 5:41:40 PM
RE: FPT corruption Posted by Yuri Rubinov @ 10/6/2005 5:56:56 PM
RE: FPT corruption Posted by Ilya Rabyy @ 10/6/2005 6:59:35 PM