>LPARAMETERS tcCursor, tcTable >IF VARTYPE(tcCursor) <> 'C' > RETURN .f. >ENDIF >IF VARTYPE(tcTable) <> 'C' > RETURN .f. >ENDIF >IF NOT USED(tcCursor) > RETURN .f. >ENDIF >LOCAL lnSelect >lnSelect = SELECT() >SELECT (tcCursor) >CURSORSETPROP('Tables', tcTable) >** The next property must include every remote field matched with the >** view cursor field. >LOCAL lcFields, lcUpdate, llRetVal >lcFields = '' >lcUpdate = '' >FOR lnI = 1 TO FCOUNT(tcCursor) > IF NOT EMPTY(lcFields) > lcFields = lcFields + ', ' > ENDIF > lcFields = lcFields + FIELD(lnI, tcCursor) + ' ' ; > + tcTable + '.' + FIELD(lnI, tcCursor) > IF UPPER(FIELD(lnI, tcCursor)) == 'KEYID' && PK field is not updatable > LOOP > ENDIF > IF NOT EMPTY(lcUpdate) > lcUpdate = lcUpdate + ', ' > ENDIF > lcUpdate = lcUpdate + FIELD(lnI, tcCursor) >ENDFOR >llRetVal = CURSORSETPROP('UpdateNameList', lcFields, tcCursor) >llRetVal = CURSORSETPROP('KeyFieldList', 'KeyID', tcCursor) >** The next property specifies which fields can be updated. >llRetVal = CURSORSETPROP('UpdatableFieldList', lcUpdate, tcCursor) >** The next property enables you to send updates. >llRetVal = CURSORSETPROP('SendUpdates', .T., tcCursor) >llRetVal = CURSORSETPROP('UpdateType', 1, tcCursor) >llRetVal = CURSORSETPROP('WhereType', 3, tcCursor) >SELECT (lnSelect) >RETURN llRetVal >