Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table's BackLink
Message
From
17/08/1997 01:51:18
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00045113
Message ID:
00045144
Views:
25
>>How can I create , by program, the back link for a table to mark it as belonging to a database ?
>>Is it only possible with the instruction "VALIDATE DATABASES RECOVER" ( But it runs only by the Command Windows) ?
>>
>>
>>thanks
>>
>>Alessio
>
>Programmatically, wouldn't the following work?
>
>Open Database MyDB
>Add Table MyTable Name MyLongTableName
>
>This assumes the table is a free table (not already part of another DBC). Or have I missed the point of your question? You may have to issue a REMOVE TABLE command first.

The problem is that I want to rebuild a corrupted file cdx without loosing anything of the table relation in my Database.
I found a solution and I think it works :

First I do a Copy structure with production of My table "TBL1" to another table named for example "TBL2" then I append from
TBL1 all the records to TBL2. This recreate the index.
Then I rename TBL1 in TBLX and finally TBL2 in TBL1.
Now if I open MyDB TBL1 is still in it with all its relations and integrity referacial , but it missed the BackLink.
To solve it I create a Form with a DataEnvironment containing TBL1. When I run it for the first time it gives me a MessageBox
asking if I Want to re-create the backLink for the table TBL1.
What do you think abaot it ?

Alessio
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform