Thank you, I'll give a look to this object tomorrow morning, but with this session object , may I call form with do form MyForm, where myform is a visual class ? Doesn't it refer only to an its own PrivATE DATASESSION OR to the standard one ?
Anyway thank you for your reply, i'll let you know
Alessio
>Hi Alessio,
>
>Have look at Session class (Introduced in VFP6/SP3)
>It creates it's own datasession where u r free to open any data, run forms, do data processing run reports etc
>
>This will not do any 'harm' to already open tables selected aliases record pointers etc...
>
>When u release session object, all tables openened within are atomatically closed.
>
>But this is not visual class, it is done in code!
>
>Typical implementation goes like this
>
>
>
>define class mydatasession as session
>
> procedure init
> this.open_data()
>
> procedure open_data
> *open data & relate tables
>
> procedure do_my_thing
>
> procedure run_form
> procedure run_report
>
>
>
>enddefine
>
>
>
>
>After you have something like this in one of your public prgs
>you can call it from anywhere by creating object based on this class
>
>
>
>local oMySess
>oMySess=createobject('mydatasession')
>oMySess.do_my_thing()
>
>
>
>It is in my opininon very flexible and practical concept,
>and I use it for almost everything I do.
>
>
>See manual for more deails about it.
>Rgds++
>