How To Retrieve Foreign Key Information from SQL Server (196084)
The information in this article applies to:
- Microsoft Visual FoxPro for Windows 3.0
- Microsoft Visual FoxPro for Windows 3.0b
- Microsoft Visual FoxPro for Windows 5.0
- Microsoft Visual FoxPro for Windows 5.0a
- Microsoft Visual FoxPro for Windows 6.0
- Microsoft Visual FoxPro for Macintosh 3.0b
- Microsoft Data Access Components 2.5
This article was previously published under Q196084 SUMMARY When creating remote views using SQL Server tables as the
data source, Visual FoxPro automatically sets the KeyField property to .T. for
columns that are included in a primary index key. You can use the SQL Server
stored procedure, sp_pkeys, to return primary key information from SQL Server.
The sp_pkeys stored procedure, however, does not return information regarding
the relationship(s) between tables.
In some circumstances, a
developer may want to retrieve the foreign key information programmatically to
provide greater detail of the relationship between tables. This article shows
how to use the stored procedure sp_fkeys to return foreign key information from
SQL Server. REFERENCES Transact - SQL Help; search on: "sp_fkeys"
(c)
Microsoft Corporation 1998, All Rights Reserved. Contributions by John Desch,
Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | kbClient KbClientServer kbcode kbDatabase kbhowto kbSQLProg KB196084 |
---|
|