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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a .DBF error

Status
Not open for further replies.

christotan

Programmer
Mar 15, 2000
6
0
0
US
Visit site
Just today, there was a sudden surge of power at my office and 2 of my main .DBF files were corrupted. Thing is, in the past when I ran my data recovery program (basically it just rebuilds the indexes <b>{thanks to dgrewe}</b>....) it works perfectly. However, today when I ran the program, I got a :<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE=monospace>&quot;General Protection Fault at &lt;address&gt;&quot;</font><br><br>and at the lower part of the message :<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE=monospace>&quot;Called from c:\......\indexer.scx&quot;</font><br><br>When I tried to open the DBF file manually in VFP, it gave the same error message but without the lower message.<br><br>What happened? Short of backing up my DBFs everytime I enter new data. What tools can I use to recover the data (is it recoverable in the first place?)? If so, where can I get them? can I integrate with my own recovery tool?<br><br>Thanks.
 
Sorry... forgot to add also that another .DBF I tried to open in VFP (after the surge) gave me :<br><br>&nbsp;&nbsp;&nbsp;&nbsp;<FONT FACE=monospace>&quot;Collating Sequence &lt;'pound' sign&gt; not found&quot;</font><br><br>What is the cause? How can it be resolved?
 
Thanks For the Plug on the SysIndex Program,&nbsp;&nbsp;Glad You Like It.<br><br>For the cure for the problem on hand. You are going to have to get a program like dSalvage or FoxFix&nbsp;&nbsp;to rebuild the headers of the damaged databases.&nbsp;&nbsp;<A HREF=" TARGET="_new"> from next occurance<br>1. Make sure all your computers are on UPS's <font color=red>and</font> surge supressors.<br>2. There is a surge suppressor for a Cat5 Cable from Black Box Inc but it is expensive at $30 a piece.&nbsp;&nbsp;I have on on each network cable that goes into my servers.&nbsp;&nbsp;<br>3. Yes I have Backup servers that back up databases as changes are made. As a matter of fact I Two.&nbsp;&nbsp;All 3 servers are Plugged into UPS's and on different dedicated 20amp circuit lines from the Electrical power boxes.&nbsp;&nbsp;The Two database servers in the same building or on seperate electrical boxes and the other server is in another building (50 feet away).&nbsp;&nbsp;All Electrical Power Boxes that have servers plugged into them had natural gas generators on them that start up if the main power to the build is cut.&nbsp;&nbsp;<br><br>The 2 servers in the same building are keep in sync with Computer Associates Arcserveit Replication Function with the open file agent. The Mirror function is on so if one server goes down the other takes over.&nbsp;&nbsp;The 3rd server is only mirrored to the other 2 once a day and then at night.&nbsp;&nbsp;During the day I keep the Databases current with a program I wrote.&nbsp;&nbsp;It uses a database that contains the name of the tables I want backed up and does a continus loop around the database. It opens the database on the main server and the backup database on the 3rd server and looks for changes to any record. If anything in the main database is different then the backup it copies the changes to the 3rd server.<br><br>Yes, some people say this is an over kill, but in 5 years I have never been down and I have keep the network up through 6 hurricanes and one lighting strike to the building.&nbsp;&nbsp;At one point I only had one database server in operation.&nbsp;&nbsp;But the answer to the over kill question is always the same,&nbsp;&nbsp;What costs more,&nbsp;&nbsp;The expense of the hardware or a couple of days of down time to repair damages databases.?<br>&nbsp;&nbsp;<br>For you network gurus that think I am killing my network band with with copying files across the lan,&nbsp;&nbsp;I have 3 network cards in each server,&nbsp;&nbsp;Each network card is a seperate network with an SMC Switchs as a hubs.&nbsp;&nbsp;One Switch is dedicated to the ArcServeIt program mirroring servers and the switch is where I run my program.<br><br>Again, if anyone wants the program that I wrote that mirrors the tables, email me.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Thank you dgrewe again for your reply. Frankly, my system is just a stand-alone system. There is no connection to LAN or netwok whatsoever. With regards to your system backing up the data after each update, did you make it such that whenever the user clicks on the &quot;Add&quot; button or something that data is backed up or is it some background program?<br><br>Thanks again.
 
I have a computer that runs 24/7 in a endless cycle of tasks that checks for things&nbsp;&nbsp;going wrong with other computers and databases and does backup copies and other minor tasks. <br><br>Since this is a stand alone system, do you have a audit trail database in you system. What I mean by a audit trail is a duplicate database in the main directory as all your other tables and when the user makes a change to a record in the main table it makes a record in the audit trail table with a date and time stamp??<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
No. I don't have an audit trial database in my system. I am thinking of using the <FONT FACE=monospace><b>FLUSH</b></font> command. Will that help things? Or do I still need to perform backups of data each time I update?<br><br>I was thinking of implementing something that will backup the data at regular set intervals (somewhat like a screen saver), say like after 5 mins of inactivity. But I don't know how to go abouts implementing it.
 
You can use a Timer that checks for KeyPress event or I'm sure there is a Win32API call that checks for ScreenSaver activity.&nbsp;&nbsp;There is a nice list at UT that shows how to call many of the available calls from VFP in the document or similar section.&nbsp;&nbsp;They just added it lately <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
OK,&nbsp;&nbsp;No Network, No LAN, No Internet connection to the database no other computer effecting the database.<br><br>You must have a screen that handles data entry and the information is not being stored in the table until you hit a add button. That means you have the fields saved to memory variables. <br><br>Try Adding a blank record in the table first and the rewrite the data entry screen to access the table fields directly.&nbsp;&nbsp;If you want you can put a flush command in the event exit and the data will be saved to the table as you miove from field to field.<br><br>That still does not address a problem I feel learking in the back of my mind.<br>1.&nbsp;&nbsp;&quot;You had a surge of power in your building. &quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Do you have a surge suppressor and a UPS on the computer?&nbsp;&nbsp;I get the feeling the answer is no.<br><br>2.&nbsp;&nbsp;&quot;In the Past I Ran My Data Recoverly Program / the Sysindex routine.&quot; <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;THIS IS A STANDALONE SYSTEM, ??? if the database/indexes are being damaged and have to be reindexed, How is the Program/Application being terminated or how is the Computer losing power so often that the files must be reindexed so often??&nbsp;&nbsp;&nbsp;With no UPS on the computer, Do you lose power to the building your in Often??? <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Thanks to <font color=red><b>JDurbin</b></font> and <font color=red><b>dgrewe</b></font> for not giving up on this problem of mine.<br><br>Yes, you are right. I don't have surge suppressors in the building I work in. Thing is, the building is pretty old and perhaps the internal power transmission is failing. Within the last 2 years, I have experienced about 2-3 surges and 1 blackout. The last surge being the worst as it totally wrecked my 2 most important databases.<br><br>My program has worked well from the time I started programming it till now (as it is still being upgraded). I ensure that the program releases all called up variables, windows, tables etc. before it terminates (A clear_events procedure that runs after the command <b>CLEAR EVENTS</b> is issued). The only problems I get are only from power surges and those IDIOTS that reboot/shutdown the computer without shutting down my program.<br><br>Issuing the <b>FLUSH</b> command..... Does that really help?
 
A UPC will handle the spikes and surges.&nbsp;&nbsp;They can be had reasonably cheop and should be considered 'must have' equipment.&nbsp;&nbsp;Some have a shutdown application feature that will allow you to exit your application gracefully even though the hapless user turned off the power to the computer.&nbsp;&nbsp;As far as the reset button you could unhook the wire to the button for one.&nbsp;&nbsp;For the Windows shutdown or restart I believe a ON SHUTDOWN will spare you there in your code.&nbsp;&nbsp;Look it up in Help for more details.&nbsp;&nbsp;YOu said your procedure clear_events handles post READ events maybe just call it with ON SHUTDOWN DO clear_events.&nbsp;&nbsp;HTH <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
John,<br>&nbsp;&nbsp;a UPC (Universal Purchasing Code) can handle power spikes and surges?...Wow, I never knew that. Just kidding. I think what he meant to say was a UPS (Universal Power Supply).<br><br>Jon
 
Or perhaps an Uninterruptable Power Supply?&nbsp;&nbsp;:) <p>Andy Blay<br><a href=mailto:a.d.blay@talk21.com>a.d.blay@talk21.com</a><br><a href= > </a><br>
 
OK, I see my learking fear was there.<br><br>&quot;The only problems I get are only from power surges and those IDIOTS that reboot/shutdown the computer without shutting down my program.&quot;<br><br>That explains the need to reindex the files so often.<br><br>The flush command will force the computer the write any information held in memory to the open database in that work area.<br> <p>David W. Grewe<br><a href=mailto:Dave@internationalbid.net>Dave@internationalbid.net</a><br><a href= > </a><br>
 
Uninterruptible PC?&nbsp;&nbsp;:O <p>John Durbin<br><a href=mailto: > </a><br><a href= > </a><br>ICQ VFP ActiveList #73897253
 
Is that the same as a crashed PC? :) <p>Andy Blay<br><a href=mailto:a.d.blay@talk21.com>a.d.blay@talk21.com</a><br><a href= > </a><br>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top