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