Hi guys,
To get the PK for a view:
CURSORGETPROP("KeyFieldList", "Myview")Now this
can return more than one PK
if the view is based on a
join of two or more tables and the PKs for each are part of the view.
Now, to get the PK for a table:
DBGETPROP("MyTable", "TABLE", "PrimaryKey")As was already said, the primary key is not the same as a primary index.
Hope this helps.
>>>Do not confuse a primary key with a primary index, they are two different things.
>>
>>But VFP returns the PI when you request the PK. So you might as well design them to be one in the same.
>
>With multiple indexes (or TAGs), each index (or Tag) would have a primary key, right? The primary key is the first "field" in the index key (example CUST+INVOICE, CUST is primary key). The same table, could have a different primary key for each index! Or, it could have the same primary key for a variety of secondary keys (or "sorts").
>
>I'm curious - are most VFP developers using VFPs native DBMS, or - are they going to SQL? Would it be to MS's advantage to drop VFP so that every commercial app we develop (and distribute) requires the enduser to buy a copy SQL 7? Right now MS gets nothing when a VFP native is distributed.
>
>Terry
- Jeff