How many reords are in the view base table? Does it have index on DELETED()? Could you post the view's SQL select.
>Hi,
>I have a local view that be recordsource of grid control. It work fines when I open my view. However, once I delete the records of view and try to refresh the grid, it take long time to process it. Sometime it can be 1-2 mins.
>
>I have test the delete command, and it just take about 1 secs to delete 2300 records.
>
>I tried the following but still the same. any ideas?
>
>
>1.
>THISFORM.LOCKSCREEN = .T.
>THISFORM.GRID1.RECORDSOURCE = ""
>*--DELETE COMMAND
>
>*--VFP take long time to process this statement
>THISFORM.GRID1.RECORDSOURCE = "MYVIEW"
>THISFORM.LOCKSCREEN = .F.
>
>2.
>THISFORM.LOCKSCREEN = .T.
>*--DELETE COMMAND
>
>*--VFP take long time to process this statement
>THISFORM.GRID1.REFRESH
>THISFORM.LOCKSCREEN = .F.
>
>2.
>THISFORM.LOCKSCREEN = .T.
>*--DELETE COMMAND
>
>*--VFP take long time to process this statement
>THISFORM.GRID1.setfocus
>THISFORM.LOCKSCREEN = .F.
>
>
>
>Pls advise.
>
>Thank you
--sb--