>Hi All,
>
>Am I dreaming or is there a way to encapsulate
>data from tables in a custom object?
>
>What I would like to do is have my custom object
>open some tables associated with it in a private
>data session that would be visible only to the
>object itself.
>
>The object would open its related tables upon
>instantiation.
>
>I have tried creating a DataEnvironment object on
>the fly with success, but there does not seem to
>be a way of opening tables inside it on the fly...
>
>Anybody has done something similar?
>Anybody has ideas?
>Am I dreaming here ??? ;)
>
>Thanks in advance
>Pascal
Pascal,
I just did this little test and it works:
de=createobject("detest")
define class detest as dataenvironment
autoclosetables=.f.
autoopentables=.f.
proc init
use molucen
endproc
enddefine
I suppose you can instantiate your custom DE on the fly.