Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foreign key help
Message
From
03/12/2004 12:33:59
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Foreign key help
Miscellaneous
Thread ID:
00966759
Message ID:
00966759
Views:
77
Hi, All

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'.

TIA
Beth
Next
Reply
Map
View

Click here to load this message in the networking platform