How To Retrieve Primary Keys for SQL Server Tables (195526)
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 Q195526 SUMMARY When you create 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. In some instances, you might
want to retrieve the primary key information through code so you can get more
detailed information about the key's structure. This article demonstrates how
to use the stored procedure sp_pkeys to return primary key information from SQL
Server. REFERENCES Transact - SQL Reference Help: sp_pkeys
(c)
Microsoft Corporation 1998, All Rights Reserved. Contributions by John Desch,
Microsoft Corporation.
Modification Type: | Minor | Last Reviewed: | 3/2/2005 |
---|
Keywords: | KbClientServer kbDatabase kbhowto kbSQLProg KB195526 |
---|
|