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

HOW CAN REPAIR A DAMAGE VFP FORM (SCX & SCT) 1

Status
Not open for further replies.

farzad321

Programmer
Sep 14, 2019
53
FR
HI TO EVERYONE
YSTERDAY WHEN I AM WORKING IN MY PROJECT , SUDDENLY VFP WAS CRASHED AND AFTER THAT I CAN'T REPOEN MY LAST FORM. I WORK ON THIS FORM MORE THAN TWO WEEKS.THISFORM HAVE TWO PART BUR I THINK THE MEMO PART MABE CURROPTED. ANYBODY KNOWS HOW CAN I REPAIR THIS FROM IN VFP9 ? ANY IDEA ACCEPTED . THIS IS URGENT FOR ME .
THANK YOU SO MUCH.

[URL unfurl="true"]https://files.engineering.com/getfile.aspx?folder=8a2194a5-164c-4467-a47b-298e95c93bda&file=variz.zip
[/url]
 
Very sorry, but I do not think you can recover much of any help at all from those two files.

Unless you have a recent back-up, I think you have to start from scratch.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Have you tried opening the form as a table? In other words:

[tt]USE MyForm.SCX[/tt]

If that works, try doing a BROWSE. Then look for any obviously corrupted records. In particular, look at the fields that are supposed to contain text, such as Class, Baseclass, ObjName, Parent, Properties and Methods. If any of those contain garbage, delete the entire record. Or, in the case of the Methods field, just delete the contents of the corresponding Objcode field (this will cause the method to be recompiled).

There's no guarantee that this will solve the problem. And even if it does, it won't necessarily restore the form to exactly where it was before. But it is definitely worth trying.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Hi Mike

I tried opening them in a Hex editor, there is content - but neither file is what it should be, the sct might yield some code or item properties, but sometimes you have to bite the bullet and go to your back-up (if you have one).

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Griff, of course, you are right about the backup. With any half-way decent backup strategy, you shouldn't have to go back very far to recover a working version (there is an ongoing discussion about this in thread779-1798531).

But I get the impression that the OP has got no such strategy in place.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
exactamundo

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
There are several DBF repair programs that can be used. I have used them in the past with great success. I suppose you can still find them somewhere. You may need to rename the file to ".dbf".
 
Thank you so much to griffMG and mike and TheProgrammerGuy and sorry for delay in post.

I can recover three version of this form from my 2012 R2 server , but can not open even with "use form.scx"

Just one question :

If I make a repair on this form.scx like a normal dbfs with some softesres and repair that, is it possible to reopen this form ?
Did I need to FPT file for MEMO field of my form ? or everythings save in scx file ?
 
Some of the properties - such as details from the data environment - are stored in the memo file.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I dont understand griff

when we create a new form, we have only two part: SCX , SCT

where is FPT or TBK file that store my memo field in it ?

the SCX is equal to one DBF with normal fields.

[highlight #FCE94F]WHERE SAVE MY MEMO DATA IN ONE FORM ?[/highlight]

In middel of scx or somewhere else ?

thank you
 
The SCT file is the memo file of the SCX

DBF/FPT corresponds to FRX/FRT, SCX/SCT, DBC/DCT, VCX/VCT.

You always need file pairs, if you only recover SCX you won't get this to open as a table.

The SCT even contains the more important parts, the code (both source code and binary), and the properties.

Bye, Olaf.

Olaf Doschke Software Engineering
 
thank you olaf

Can i rename the scx to dbf and sct to fpt and then repair that like a normal dbf with third party softwares ?

thanks for responding olaf
 
You likely won't get back what you had, but you can try it.

If repair tools you use only go for DBF/FPT/CDX, then rename your file copies. It's not a secret these file pairs are free DBFs, the help documents that, too.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Very good my friend.

I will try to do that.

I am very happy to find your suggestion and guid (sorry for my english too)

thanks again olaf
 
Farzad,

There is a backup especially and built by VFP, just like VFP backups your .prg and .dbf files into .bak files. For that you must 1st apply projecthook.vcx on your project and than use the code created by Andy Kramek c.s. which you will find in '1000 Things You Wanted to Know About Visual FoxPro', on page 500 and following. The procedure creates backups for SCX,VCX,FRX,MNX and LBX and there associated partner Memo files.
One drawback, just like the native backup of .prg and .dbf files it creates only 1 backup the next backup overwrites the earlier backup, a new backup would be user friendly. How many times have you create a new version of your .prg file and than had to conclude the new version did not what it should do, - you could have instantly make use of the .bak and overview your new version - however if you first change something on your new version, you will overwrite the old .bak file and you end up with both a .bak and a .prg file not correct, grrr.
Still a backup is better than no-backup, the procedure now created for the other files can be a lifesaver and a pity mr. Chen has not yet implant in his VFPA (VFP10).

Regards,

Koen

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top