Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add foreign key code problem
Message
 
 
À
08/09/2008 12:13:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6
OS:
Windows XP SP2
Network:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01345791
Message ID:
01345800
Vues:
26
>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.

Your syntax is wrong. See Re: Where is the Syntax Error Thread #1287604 Message #1287608 You need to check the exact syntax of this command in Help.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform