×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Opening a .DBF error

Opening a .DBF error

Opening a .DBF error

(OP)
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 {thanks to dgrewe}....) it works perfectly. However, today when I ran the program, I got a :

    "General Protection Fault at <address>"

and at the lower part of the message :

    "Called from c:\......\indexer.scx"

When I tried to open the DBF file manually in VFP, it gave the same error message but without the lower message.

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?

Thanks.

RE: Opening a .DBF error

(OP)
Sorry... forgot to add also that another .DBF I tried to open in VFP (after the surge) gave me :

    "Collating Sequence <'pound' sign> not found"

What is the cause? How can it be resolved?

RE: Opening a .DBF error

Thanks For the Plug on the SysIndex Program,  Glad You Like It.

For the cure for the problem on hand. You are going to have to get a program like dSalvage or FoxFix  to rebuild the headers of the damaged databases.  www.hallogram.com

Prevention from next occurance
1. Make sure all your computers are on UPS's and surge supressors.
2. There is a surge suppressor for a Cat5 Cable from Black Box Inc but it is expensive at $30 a piece.  I have on on each network cable that goes into my servers.  
3. Yes I have Backup servers that back up databases as changes are made. As a matter of fact I Two.  All 3 servers are Plugged into UPS's and on different dedicated 20amp circuit lines from the Electrical power boxes.  The Two database servers in the same building or on seperate electrical boxes and the other server is in another building (50 feet away).  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.  

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.  The 3rd server is only mirrored to the other 2 once a day and then at night.  During the day I keep the Databases current with a program I wrote.  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.

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.  At one point I only had one database server in operation.  But the answer to the over kill question is always the same,  What costs more,  The expense of the hardware or a couple of days of down time to repair damages databases.?
  
For you network gurus that think I am killing my network band with with copying files across the lan,  I have 3 network cards in each server,  Each network card is a seperate network with an SMC Switchs as a hubs.  One Switch is dedicated to the ArcServeIt program mirroring servers and the switch is where I run my program.

Again, if anyone wants the program that I wrote that mirrors the tables, email me.

David W. Grewe
Dave@internationalbid.net

RE: Opening a .DBF error

(OP)
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 "Add" button or something that data is backed up or is it some background program?

Thanks again.

RE: Opening a .DBF error

I have a computer that runs 24/7 in a endless cycle of tasks that checks for things  going wrong with other computers and databases and does backup copies and other minor tasks.

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??

David W. Grewe
Dave@internationalbid.net

RE: Opening a .DBF error

(OP)
No. I don't have an audit trial database in my system. I am thinking of using the FLUSH command. Will that help things? Or do I still need to perform backups of data each time I update?

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.

RE: Opening a .DBF error

You can use a Timer that checks for KeyPress event or I'm sure there is a Win32API call that checks for ScreenSaver activity.  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.  They just added it lately

John Durbin


ICQ VFP ActiveList #73897253

RE: Opening a .DBF error

OK,  No Network, No LAN, No Internet connection to the database no other computer effecting the database.

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.

Try Adding a blank record in the table first and the rewrite the data entry screen to access the table fields directly.  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.

That still does not address a problem I feel learking in the back of my mind.
1.  "You had a surge of power in your building. "
       Do you have a surge suppressor and a UPS on the computer?  I get the feeling the answer is no.

2.  "In the Past I Ran My Data Recoverly Program / the Sysindex routine."
        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??   With no UPS on the computer, Do you lose power to the building your in Often???

David W. Grewe
Dave@internationalbid.net

RE: Opening a .DBF error

(OP)
Thanks to JDurbin and dgrewe for not giving up on this problem of mine.

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.

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 CLEAR EVENTS 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.

Issuing the FLUSH command..... Does that really help?

RE: Opening a .DBF error

A UPC will handle the spikes and surges.  They can be had reasonably cheop and should be considered 'must have' equipment.  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.  As far as the reset button you could unhook the wire to the button for one.  For the Windows shutdown or restart I believe a ON SHUTDOWN will spare you there in your code.  Look it up in Help for more details.  YOu said your procedure clear_events handles post READ events maybe just call it with ON SHUTDOWN DO clear_events.  HTH

John Durbin


ICQ VFP ActiveList #73897253

RE: Opening a .DBF error

John,
  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).

Jon

RE: Opening a .DBF error

Or perhaps an Uninterruptable Power Supply?  :-)

Andy Blay
a.d.blay@talk21.com

RE: Opening a .DBF error

OK, I see my learking fear was there.

"The only problems I get are only from power surges and those IDIOTS that reboot/shutdown the computer without shutting down my program."

That explains the need to reindex the files so often.

The flush command will force the computer the write any information held in memory to the open database in that work area.

David W. Grewe
Dave@internationalbid.net

RE: Opening a .DBF error

Uninterruptible PC?  :O

John Durbin


ICQ VFP ActiveList #73897253

RE: Opening a .DBF error

Is that the same as a crashed PC? :-)

Andy Blay
a.d.blay@talk21.com

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close