João,
COPY TO creates a new table. If csantos.dbf is already open, either on your workstation or another, COPY TO will fail...even if EXCLUSIVE is off.
>
>In form:dataenvironment a free table csantos.dbf exclusive=.F.
>In form:load SET EXCLUSIVE OFF
>
>When i run this code it gives me file in Use
>
>
> lcAlias=LOWER(SYS(2015))
> .Grid1.recordsource=''
> .Grid1.ColumnCount=4
> .Grid1.refresh()
>
> .RS2DBF(.oRS0,lcAlias)
> select (lcalias)
>
> copy to csantos.dbf ---- ERROR HERE
>
>
Steve Gibson