Hi Cetin
>-Get a list of tables that need to be used exclusively in a chain operation (ie: delete and pack records from a table. This should in turn affect a series of child tables either by removing -deleting- or orphaning them. What RI does in its simple form but my own RI implementation.)
Okay, done
>-Should the operation fail or continue if anyone of them cannot be used exclusively
In this situation dele pack as and when available, but yes in serious apps there could be a situation where all the required tables are to be exclusive before proceeding.
>-To try to take them into exclusive mode check sessions they're used and take action as appropriate
You mean all together at the very begining, no matter how long the actual process takes, then here it is okay but serious apps yes.
>-Backup
What? <g> With my experience of providing backup routines in the app, the users end up troubling us more for third party utilities then for the app itself <g>. But yes I have warned the user on the form in red.
>-Loop the tables to operate on and do whatever
Okay
>-Inform the user of the steps you're performing
Anything simple, I generally use WAIT WINDOWS NOWAITs
>Well even outlining was not easy at the moment:)
Looks complete to me nevertheless. Thanks.
>I'd instead make it simple:
>
>
on error llHadError = .t.
>use myTable exclusive in 0
>on error
>if m.llHadError
> aerror(arrErr)
> ? 'Error',arrErr,message(),message(1)
>else
> * do whatever
>endif
We can maybe have a ExclOpenTble() function borrowing and expanding the name from Nadya's function. Or maybe put in a shortcircuit logic in Nadya's function when EXCLUSIVE is specified.