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

What will cause the error "cannot resolve backlink"?

Status
Not open for further replies.

pctest

Programmer
Apr 12, 2004
89
0
0
US
How can I find out what causes the error "cannot resolve backlink"? I want to know how to duplicate this error.


Thank you for any help.
 
Basically, every table (.DBF file) that is part of a DBC (database container) has the path to the .DBC file embedded in the .DBF header.

When VFP reports it can't resolve this "backlink", either the table has moved, or the .DBC has moved (or been deleted).

Instead of just moving dbfs around that are in a database, use the "FREE TABLE tablename" command to remove the backlink.
 
Hi wgcs,

I understand that dbf contains the path to the dbc. I'm interested in how to duplicate this error.

I have tried to move a dbf away from its associated dbc and use it. But this will only get the dialogue to "Would you like to try to locate the owning database or delete the link...?

I have tried to delete a dbf and then validate database. This will only yield cannot find the file...

Thank you for any help.


 
Try copying a table to a temp location,
drop the table from the DBC,
copy the table back,
then try to open the table.

Without an ON ERROR routine, you get a message "Cannot link table ... with its database.... would you like to try to locate the owning database....", With an ON ERROR, you get
error 1976.

The help says of it:
Cannot resolve backlink (Error 1976)

Visual FoxPro was unable to successfully match a table with its database.

Use VALIDATE DATABASE to verify the links in the database.
 
Hi wgcs,

I can duplicate it now. So, VFP native error routine will not provide the message "Cannot resolve backlink".

Thank you for your help.
 
Wgcs,

Instead of just moving dbfs around that are in a database, use the "FREE TABLE tablename" command to remove the backlink.

Just to clarify -- for the benefit of anyone not familiar with this area: FREE TABLE should only be used to resolve the sort of problem that Pctest mentioned. Don't use it merely to remove a table from a database, for which you should use REMOVE TABLE instead.

Even with REMOVE TABLE, you will lose all the validation rules, triggers, default values, long field names and other DBC-based information held for the table.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Thanks Mike, for clarifying that about these dangerous commands!
 
Another one to look out for is DROP TABLE. Not only removes the table from the database, but deletes it from the disk WITHOUT WARNING.

Regards,

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top