Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add foreign key code problem
Message
De
08/09/2008 12:13:20
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Add foreign key code problem
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01345791
Message ID:
01345791
Vues:
58
Trying to define a table using code. Get a syntax error for "add foreign key" line of code.
	add table (gcPLANHOME+lcCHTABLE)
		
	use (gcPLANHOME+lcCHTABLE) in 0 excl
	select (lcCHTABLE)
	*remove plan table fields from new ch table
	alter table (gcPLANHOME+lcCHTABLE) drop column inid
	alter table (gcPLANHOME+lcCHTABLE) drop column indatetime
	alter table (gcPLANHOME+lcCHTABLE) drop column chid
	*keep chdatetime

	ALTER TABLE (gcPLANHOME+lcCHTABLE) ADD COLUMN logid I
	ALTER TABLE (gcPLANHOME+lcCHTABLE) ADD COLUMN uwapprvl C(2)

	alter table (gcPLANHOME+lcCHTABLE) add foreign key planid tag planid  && gets "syntax error"
	alter table (gcPLANHOME+lcCHTABLE) add foreign key logid tag logid
	alter table (gcPLANHOME+lcCHTABLE) add foreign key chdatetime tag chdatetime
Where is code wrong? Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform