************MarkPrimary.prg****************
PARAMETERS ViewName
x=ALIAS()
USE IN 0 &viewname
PrimKeys = CURSORGETPROP('KeyFieldList',viewname)
i=1
remField=PrimKeys
DO WHILE i <> 0
nextcomma=AT(remField,",")
IF nextcomma=0 and len(remfield)=0 THEN
i=0
EXIT
ELSE
IF nextcomma=0 and LEN(remfield)<>0 then
tmpfield=remfield
y= DBSETPROP(ViewName + "." + ;
tmpField,'Field','UPDATABLE',.T.)
i=0
EXIT
ELSE
tmpField=SUBSTR(remField,i,NextComma -1)
remfield=SUBSTR(remfield,nextcomma + 1)
i=nextcomma
y= DBSETPROP(ViewName + "." + ;
tmpField,'Field','UPDATABLE',.T.)
ENDIF
ENDIF
ENDDO
SELECT (viewname)
USE
IF NOT EMPTY(x) THEN
SELECT (x)
ENDIF
**************End MarkPrimary.prg*******************