Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Removing tables
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00246085
Message ID:
00246112
Views:
13
>Hello All,
>I've come across a peculiar problem tat I need some help on.
>
>I have a program that:
>1) copies all files from a specified directory.
>2) removes the tables from the DBC container
>3) processes merged data, etc.
>4) passes the data, in ASCII format to the Oracle area
>
>My problem lies in step number 2
>
>I create an array with adoobjects(array1,'table').
>then the code
>for x = 1 to alen(array1)
> remove table &array1(x)
>endfor
>I get an error message stating that the selected table is involved in a relationship. Upon checking the help, it tells me to delete the relationship first!! So, I create another array with adbobjects(array2,'relation') but what is the command to delete an relationship inside the DBC??
>
>Thanks
>
>Sandy

Are you wanting to just free the table from the DBC or actually remove AND DELETE the table? DROP TABLE will remove the table from the DBC and delete the table from disk. Otherwise you have to use the command ALTER TABLE to remove persistent relationships. If you have run the HOME() + "Tools\GenDBC\GenDBC" app to create all the code used to create your DBC, you can MODI COMM to see how the tables were altered in order to figure what relations need to be dropped. Look for a function called MakeRelation_# where # is sume number.

The syntax you will need to drop the relation is:

ALTER TABLE MyTable DROP FOREIGN KEY TAG Tagname
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform