Thanks, seems exactly what i wanted. I'll check and update.
Jaime
>>Hi
>>This is a basic sql-view question, but after many tries it still doesn't work, i'm probably missing something obvious.
>>I built a parameterized view manually - not through the designer, because it contains an UNION clause. One of the fields is just either 1 or 0, and serves as a record marking field in the grid that shows the view. No matter what i do, that field is read-only in the grid. How do i change it to readwrite? I don't need any other field updatable in the view.
>>
>>TIA
>>Jaime
>
>Jaime,
>
>It's not clear to me whether the problem is in the view - or in the grid
>If it's in the view try
>
>#ifndef TRUE
> #define TRUE .t.
> #define FALSE .f.
>#endif
>
>function do_it()
>
> local ViewName, UpdatableField
> ViewName = 'TheView'
>
> UpdatableField = 'FieldName'
>
> local i, n, af[1]
>
> use (m.ViewName) in 0 NODATA
>
> n = afields(af, m.ViewName)
> for i = 1 to n
> =dbsetprop(m.ViewName+'.'+af[i,1], 'Field', 'Updatable', FALSE)
> endfor
>
>
> =dbsetprop(m.ViewName+'.' + m.UpdatableField, 'FIELD', 'Updatable', TRUE)
>
> =dbsetprop(m.ViewName, 'VIEW', 'SendUpdates', TRUE)
>
>endfunc
>
Why do programs stop working correctly as soon as you leave the Fox?