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: 78665 # Views: 1 # Ratings: 0
Version: Not Applicable Category: Databases, Tables and SQL Server
Date: Thursday, October 06, 2005 5:56: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?
>
>
Yes, it's called "cirkul". (:>)
>
> > 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.
>
>
What section? I haven't seen the description of the DBF's header since the printed Programmer's Guide for FoxPro 2.6.

In VFP9, go to HELP-->Index-->File Structures
>
> I never heard about experiments like you did, and I cannot imagine the situation when it is needed.
> >
>
It is very simple to imagine, actually: first portion of data (in DBF/CDX/FPT files) is sent to another location (i.e. customer, or another branch) on a CD or DVD and copied over onto an HDD; next time, another CD/DVD with daily (weekly, monthly) data for appending. Operator changes attribute for DBF but forgets (or doesn't know) to do so for CDX and FPT...

So, it is not needed; it was operator mistake.

> > >
> > > 2. Could it be the cause of FPT corruption that DBF is NORMAL and FPT is READONLY?
> >
> > Yes, as you can see.

>
> Spasibo, Yuri! I'm gonna put it to the test today.
>
> "I'll be baaaak" (CA Gov. A. Schwartzenator as T-100.)
>
> 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