Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Foreign key help
Message
De
03/12/2004 12:53:05
 
 
À
03/12/2004 12:33:59
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00966759
Message ID:
00966766
Vues:
8
This message has been marked as the solution to the initial question of the thread.
Try
lcInsertStr = "ALTER TABLE " + lcTableName + " ADD CONSTRAINT STUDNT_ID_ FOREIGN KEY (STUDNT_ID) REFERENCES STUDNT (STUDNT_ID_)"
HTH

>I am trying to create a foreign key reference into a table through SPT from VFP. This is the code that I setup, but SQL Server sends back an error.
>
>
  lcInsertStr = "ALTER TABLE " + lcTableName + " ADD CONSTRAINT STUDNT_ID_ FOREIGN KEY REFERENCES STUDNT (STUDNT_ID_)"
>
>
>the error is:
>
>1526 Connectivity error: [Microsoft][ODBC SQL Server Driver][SQL Server]Number of referencing columns in foreign key differs from number of referenced columns, table 'STUTRN'.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform