Re: Using local view exclusively = reducing table corruption possibility??? by Al
Al
Fri Apr 16 13:00:27 CDT 2004
A very good question.
vfp will always open the underlying tables again when performing a query
This is true even if you also have the tables open. To prove this, open in
the form in buffered
mode, make changes, then your changes will not be reflected if you open
another view
on the same tables. And vfp will close any tables it opened (usually) after
the query
If you issue a tableupdate(), even within a transaction, on a view without
the underlying
tables opened, then vfp will open the tables.
What is NOT clear (we haven't tested) is in what mode they are thus opened.
If they are opend in any but table buffered mode, then the update could
fail and cause corruption.
To avoid this, we always make sure all table are opened by us in table
buffered mode
al
"Willianto" <willianto@remove-me.telkom-and-me.net> wrote in message
news:e0PPEM8IEHA.2908@TK2MSFTNGP09.phx.gbl...
> Hi all,
>
> Just crossed my mind this afternoon: as we all understand, whenever we
> put a local view in the form's Data Environment, then vfp would open the
> underlying tables as well. I wonder if this has anything to do with
> table corruption possibility. I mean; what if the form only open the
> local view and not the underlying tables; suppose there is a power
> failure in the middle of transaction; would the table corruption
> possibility is lower than if the tables are open as well?
>
> (I hope I could convey my question well. Yet, if the question isn't
> clear enough, please let me know, I'll try to re-phrase.)
>
> TIA,
> Willianto
>
>