<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Fri, 09 Aug 1985 21:12:43 GMT
From   : jp@LANL.ARPA
Subject: Re: dBASE II Question

> 
> 
> I have a dBASE II question.  First, the scenario.
> 
> File X.dbf contains 100 records.  File Y.dbf contains  0  records
> but  has the same definition (i.e., STRUCTURE) as X.dbf.  Someone
> inadvertently issues the command:
> 
>         . use Y
>         . copy to X structure
> 
> The result is that the 100 records in X.dbf are still there,  but
> because it now has the definition of Y.dbf, X.dbf appears to con-
> tain 0 records. Any reference to a record number  in  X.dbf  pro-
> duces an error because the definition thinks there are none.
> 
> The question: is there any way to fake the  definition  of  X.dbf
> into  recognizing  those  100  records?  I tried doing an APPEND,
> thinking that when it updated the definition it  would  count  in
> the  100 records that were there plus the dummy record I just ad-
> ded.  Wrong.  It now says I have 1 record in X.dbf instead of 0.
> 
> --Gerry
> 

I haven't tried this but if the file got screwed up the way you say it
did, whynot just reverse the process.  Create a new file with the correct
structure, enter the appropriate number of records (or more, if you must guess)
then copy the correct structure back into your file.  If all you did by
your mistake was change the structure and record number, this should fix 
you up.

Jim Potter jp@lanl.arpa
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>