Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Corrupted

Status
Not open for further replies.

advsoft

Programmer
Apr 20, 2004
5
GT
A user was using a table when the energy pull down, later when we tried to acces to the table was a error message, telling :

"Table xxxxx has become corrupted. The table will need to be repaired before using againg."

With two optiones, Cancel or Help

The Help Message tell me:

"Either the table record count does not match the actual records in the table, or the file size on the disk does not match the expected file size from the table header. Repair the table using an appropriate third-party repair utility for Visual FoxPro tables before opening the table again."

What i can do to repair this table.

Thanks
 
advsoft,

After you try any of the suggestions above, I suggest you make use of a UPS to prevent anymore corruptions. Corruptions in the database happens if you do not put a litte care on your database. FYI, Oracle, SQL server, and other expensive databases cannot run properly without proper UPS and airconditioning system. Why? Because of possible corruptions. So it's the same thing with the VFP database.

It's a wrong notion that VFP database can easily
be corrupted. My answer is NO. It is how you handle your database properly. It's a matter of how you treat it properly.


Bren
Project Team Head - Philippines
 
Bren,

Oracle, SQL server, and other expensive databases cannot run properly without proper UPS and airconditioning system.

Did I read that right? Do you mean that you need air conditioning (as in a system for lowering the temperature of the room) in order for a computer to run SQL Server?

I understand that the computer itself needs to be cooled. That's what the internal fan is for. But, surely, if the computer is capable of running, why would any particular software need extra cooling?

Sorry if the answer is obvious, but I don't see it.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Mike,

If you store huge amount of valuable informations in your server, and you didn't invest in it's maintenance, your putting these valuable informations into garbage. Yes it will run Mike though without UPS and airconditioning system, but let me ask you, are you comfortable with that kind of setup?

I guess these make things more clearer now for you.


Bren
Project Team Head - Philippines
 
Bren,

Yes, I understand that. But you specifically said that you need air conditioning for "Oracle, SQL server, and other expensive databases". If you are in an environment where a/c is necessary for the computer, surely it is equally necessary for all software running on the computer?

MIke


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Mike,

Our company is using Oracle 8i as backend and VFP as frontend. I remember that on Saturday morning, at 6:30 am we left the office for an out-of-town summer outing last 2001. We also left the Oracle server and its database open so that other departments may use it while we are away. We have the UPS in place and our cooling system is functioning well. In the afternoon, at exactly 3:30 pm, one of the employees called one of our programmer and said that they can't proceed with the programs cause an error occured. That night when we arrived at the office we found out that the airconditioning system was not functioning, the server was shutdown and heat all over the control room.

Mike, we lost our database. We couldn't recover them. We merely depends on our backup and it took us month to set it up again. Our database administrator nearly lost his job. Lucky for him.

What I am saying is based on experience and not by opinion.


Bren
Project Team Head - Philippines
 
Bren,

That's quite a disaster. You have my sympathy -- as does your DBA. However, I still maintain that the problem would have happened if the machine in question had been running any software (though admittedly a failure might not have been such a disaster).

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
foxwizard,

Unlike with Oracle and SQL server, FoxPro tables are prone to corruption even if power failure happens on the client PC. If SQL server can afford not to have UPS on the frontend, you can't do this with FoxPro database. You should provide UPS on every PCs which have update access to your FoxPro database.

Medic
 
Medic,

Yes, I agree with that.

With both these issues (air conditioning and UPS), the answer must partly depend on where in the world you are located. I can understand the requirement for air conditioning in the Philippines, and there are no doubt places where the power supply is dodgy. Niether of those is a problem in Scotland (we are more likely to heat the room containing the computer rather than cool it <g>).

However, given the value of data to the organisation, it definitely makes sense to take every precaution.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
This taking it to the nth degree, you might also need to UPS your hubs/switches as well <g>.

A lot of my apps run on clients sites, and I mean building sites, and we do from time to time get the odd corrupt file - usually after a power outage of some kind (generator out of fuel, digger through mains etc.). Very few sites have the foresight to add even the cheapest UPS to the workstations, many rely on peer-to-peer networking with a workstation doubling up as a file server. Under these circumstances SQL style databases are a complete non-starter anyway (portability is the name of the game).

The trick is regular back-ups, which need to be checked from time to time, and knowing which files are likely to be spoilt - .fpt and .cdx for the most part.



Regards

Griff
Keep [Smile]ing
 
Hey Griff,

I guess building sites must raise all kinds of problems as far as computing environments are concnered. Diggers cutting through power mains isn't something I've ever had to worry about.

BTW, seems like you haven't been around here much lately, or it is just that our threads haven't crossed? Good to see you again whichever.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks to All.

What i do is:

SET VALIDATE TO 0
Open the table
then traslate the records to other table
zap the table
traslate the records from the temporal table
SET VALIDATE TO 3
 
Hi Mike

Off topic I know, but I have been a LITTLE unsure as to which VFP thread/forum to follow since the split was made!

I also lack exp. with some of the more recent developments in VFP - having stopped at VFP 6 for the time being - so I've been reading (lurking) rather a lot!

And yes, building sites are a 'challenging' environment! Concrete dust is a real problem for tape drives, theft is a major problem - some stories are unbelievable, imagine all your laptops secure in a locked portacabin - all cable locked to the walls, grills on the windows - and someone really wants them....

So they take the whole cabin! Just cut the power with bolt cutters and lift it away on a lorry!

Still the people are great, and the project nature of the business makes them very focussed on the important parts of the job!

Thanks for asking - how are you?

(Perhaps we should use the e-mail!)



Regards

Griff
Keep [Smile]ing
 
Medic,

Yes, I agree with you too.

Corruption happens also to client pc.


GriffMG,

That's correct. Regular backup is the key.



Bren
Project Team Head - Philippines
 
Griff,

I have been a LITTLE unsure as to which VFP thread/forum to follow since the split was made!

Your're not the only one, it seems. Personally, I just check them all in sequence, which is not so bad once you get used to it.

I also lack exp. with some of the more recent developments in VFP - having stopped at VFP 6 for the time being

At some point, you should certainly consider getting a more recent version -- perhaps after 9.0 arrives. It will take you a while to get to know all the new features, although at base it's still the same old VFP that you already know. But there are so many good things in the new versions that it would be a shame not to take advantage of them.

Your story about the poracabin is fascinating. I'm glad I don't have those sorts of problems in my work.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top