Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foreign key help
Message
From
03/12/2004 12:53:05
 
 
To
03/12/2004 12:33:59
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00966759
Message ID:
00966766
Views:
7
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'.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform