Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Primary Key
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00733075
Message ID:
00733089
Views:
41
George,

There's more than one way to do that in In Sql Server. In addition to SQL-DMO, you can use sp_pkeys system stored procedure or INFORMATION_SCHEMA view
USE pubs
EXEC sp_pkeys sales, dbo, pubs 
* 
SELECT constraint_name AS PK_name  
	FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS 
	WHERE table_name = 'sales' 
		AND constraint_type = 'PRIMARY KEY'
>Alex,
>
>The reason I asked about the whether it's a VFP or SQL Server table, is that the methods would be different.
>
>In VFP you could also use the PRIMARY() function. In SQL, you'd have to use SQLDMO.
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform