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:
00733086
Views:
47
>>Does anyone know of a method to identify the primary key for a table programmatically?
>>
>>John Weller

>
>In VFP you can do it with DBGetProp() like this:
>
>OPEN DATABASE (HOME(2)+"data\testdata")
>USE (HOME(2)+"data\customer")
>? DBGETPROP("customer","table","PRIMARYKEY")
>
>
>HTH

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

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform