dni


I have a huge dbc data base. It is working perfect in vfp 7 sp1. When I am trying to use it in vfp 9 sp1, I receive a error in DCT file when I try to browse or use some tables (not at all, jus few tables).





Re: DCT FILE

Alex Feldstein


First I would try to pack it in VFP7 (work on a copy).

VFP9 checks files more thouroughly for problems and finds issues that previous versions ignored.

See: SET TABLEVALIDATE in help.






Re: DCT FILE

Vladimir Zografski

IMO this tables are corrupted.
Try with SET TABLEVALIDATE to 0.
And in that case you should fix the corruption, not simply ignore it.






Re: DCT FILE

dni

Thanks I will try both...






Re: DCT FILE

dni

I tryed both but no results. Full error message is: "Memo file n:\data\data.dct is missing or is invalid"

All is fine with vfp 7. I can build a new dbc file, and make tables free and add them in new vfp 9 dbc but I will lose long field names ....






Re: DCT FILE

Lightening

If you remove tables and add them back into DBC, you have to modify their structure to put back the long field name.





Re: DCT FILE

dni

Yes I know that and I don't want it ...Anyway it is working fine in 7....






Re: DCT FILE

Naomi Nosonovsky

In VFP7 try:

OPEN DATABASE myDBC EXCLUSIVE

VALIDATE DATABASE RECOVERY

PACK DATABASE

COMPILE DATABASE

CLOSE DATABASES ALL

If you still would not be able to open your database after that, you may run GenDBC to get DBC script, then create a new empty database and append data for each table. This should not be hard to write.





Re: DCT FILE

dni

Correct is RECOVER instead RECOVERY and compile is not working with databases. Thanks for help but no results...






Re: DCT FILE

Naomi Nosonovsky

Compile DATABASE is a valid command. Please check it in Help.

Compiles stored procedures in a database.

COMPILE DATABASE cDatabaseName | cFileSkeleton |  

Are you saying you're unable to make this database to be opened in VFP9 even with SET TABLEVALIDATE to 0

If so, you may either try to repair it using repair tools or try to create a script to generate new empty database and append into each table, as I suggested.





Re: DCT FILE

dni

I can open database (it has arround 27 tables with long field names) in 7 and in 9 . Only in version 9, I can not acces 3 tables and I receive the error I showed up. In version 7 is working fine and I can access all tables.

I used SET TABLE VALIDATE TO 0, but nothing has changed ...






Re: DCT FILE

Naomi Nosonovsky

I see. Then it's even easier.

1. Make a good backup of your database.

2. Generate script using GenDBC

3. Remove 3 bad tables from database and physically delete them (you have a backup)

4. Recreate these 3 tables using the script.

5. Append from the backup copy records for these 3 tables.

However, if your tables are involved in persistent relationships, the above technique may not work Sad





Re: DCT FILE

dni

When I try to run GenDBC I have same error (with DCT file) in 7 and in 9 !

VALIDATE DATABASE RECOVER is passing in 7 with no errors, but not in 9....






Re: DCT FILE

Naomi Nosonovsky

Ouch. Ok, so we can not even generate a script for the database.

Make a backup, remove the 3 offending tables (assuming no relations) and try to validate / create script. If everything is OK, add just these 3 tables.





Re: DCT FILE

dni

All is fine after a long process.

Command :

VALIDATE DATABASE RECOVER

-no error in vfp 7

-error in vfp 9 (in dct file) and surprise!!!

-vfp 6 error at few indexes and one table.

So, I copied structure and record to a free table(with 7). I had 171 fields but only 20 with long names.

Deleted table from dbc (with 6).

Opened dbc with vfp 9. Ran VALIDATE DATABASE RECOVER - NO ERROR.Added table.

Rebuit indexes and relations, and modified fields with log names....

Funny behavior for validate ...Thanks for help...