Tuesday, November 29, 2005

DBFs cause hair loss

I have been working on an application over the last couple of days for a client. I needed to add 20 or so fields to the OrderMaster table of this application. Simple thing to do, right? Not for me.

I use xCase to model data (both for VFP and for SQL Server). I love xCase for many reasons, but it is way better than using the native SQL Server and VFP Database and Table Designers. I added a bunch of fields yesterday and needed to add a couple I missed today. xCase has this wonderful feature which updates the table structures automatically. Today I get an error during the update:
The fields in table 'OrderMaster' did not match the entries in the database (Error 1984)
Argh! The "big brother is watching you error" - reference to George Orwell's famous book titled 1984. Sorry, I digress.

I believe this is the worst possible error you can get when working with VFP data. The solution recommended by the Help file is to use the VALIDATE DATABASE command or to remove and re-add the table to the database. Both of these options should include a disclaimer that says something to the effect of "both these solutions will hose the database worse and cause your hair to turn grey and fall out."

The better solution is to get out my trusty backups. Unfortunately, this morning I took my 250GB USB drive and the latest copy of the backups burned on DVD to the safety deposit box at the bank. This is my offsite backup scheme. I rotate the USB drive and permanently leave the DVDs in the box. No problem I'll just go back and bring them home. Too late - banks close at the worst possible times when it comes to being a developer. So now I get to wait until the morning to get the backups and finish up this project.

This would never be happening to me if I was working with SQL Server {s}.

I have emailed the client to let him know I am a victim of Murphy's Law, and there will be a short delay in getting him a new release. I just hate having to send emails with bad news.

Guess I have some time to push out another ViewEditor v3.6 Release Candidate this evening.....

1 Comments:

At 1/27/2006 06:28:00 PM, Anonymous Anonymous said...

Sounds like a wide open opportunity for someone (cough, cough) to write a 'hackDBF' tool!

Mike Collins

 

Post a Comment

<< Home