Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site lanl.ARPA Path: utzoo!linus!philabs!cmcl2!lanl!jp From: jp@lanl.ARPA Newsgroups: net.micro.cpm Subject: Re: dBASE II Question Message-ID: <29487@lanl.ARPA> Date: Fri, 9-Aug-85 17:12:43 EDT Article-I.D.: lanl.29487 Posted: Fri Aug 9 17:12:43 1985 Date-Received: Mon, 12-Aug-85 04:39:18 EDT References: <512@brl-tgr.ARPA> Organization: Los Alamos National Laboratory Lines: 33 > > > 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