>>Hi, I have these command lines:
>>
>>Select * from Mytable into cursor MyCursor
>>
>>* Then :
>>
>>Select MyCursor
>>Scan
>> If field1=1
>> replace field2 with date()
>> Endif
>>Endscan
>>
>>How to write into MyCursor? VFP tell me: Can´t write in the cursor..
>>The question is: how to do it writable?..
>>
>>Thanks in advance
>>Carlos Burgos
>
>Select has a clause readwrite or nofilter, but I can not remember in what version were they added, so, if they do not work for you, you can try after de select:
>
>
>use dbf('myCursor') again alias myWritableCursor in 0
>use in select('myCursor')
>
>select myWritableCursor
>scan
>...
>endscan
>
A word of warning about this.
VFP 6 does not support READWRITE, so Hugo's statements are what you need to do.
BUT VFP 6
does support NOFILTER. If you don't use that clause, you could wind up having a filtered view to the main table and
when you open the cursor again you are really opening the underlying table again WITHOUT THE FILTER. You could easily be updating records you never intended to touch.