Lets just look at this part of the code.
Just to let you know. If you surround your code with a tag it will preserve the tabbing.
>
>select (tcTableName)
>dime aFlds(1)
>nNoFields = afield(aFlds)
>
>for lnKnt = 1 to nNoFields
> lcFieldName = tcViewName + "." + aFlds(lnKnt,1)
> lcUpdateField = tcTableName + "." + aFlds(lnKnt,1)
> lcFieldType = aFlds(lnKnt,2) + ;
> "(" + alltrim(str(aFlds
It looks like here that the keyfield is not updatable but the rest are.
I thinks you want all of your fields updatable.
(lnKnt,3)) + ")" )
> if aFlds(lnKnt,1) = cIDField
> DBSetProp(lcFieldName, 'Field', 'KeyField', .t.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .f.)
> else
> DBSetProp(lcFieldName, 'Field', 'KeyField', .f.)
> DBSetProp(lcFieldName, 'Field', 'Updatable', .t.)
> endif
> DBSetProp(lcFieldName, 'Field', 'UpdateName', lcUpdateField)
> DBSetProp(lcFieldName, 'Field', 'DataType', lcFieldType)
>endfor
HTH
Dan