1. AUSED( ) returns all tables opened in the curent data session.
The form.datasessionid property specifies the form datasession
The DataSession property specifies whether a form, form set, or toolbar can run in its own data session and has a separate data environment. Available at design time; read-only at run time
2. Yes. For example create a view with the wiev designer and when in the browse window close one of the tables that is used in the view. Vfp will crash.
Set the form DataSession to 1 and use Aused for 1 and U will have to seee you're tables.
U can't set the datasessionID. U should read it and then use Aused with the ID.
AUSED(ArrayName [, nDataSessionNumber])
Ionut