>>Tis can't be done. A dataenvironment can only be contained in a form. If oyu want to create a custom one, add it to the form.
>
>Sorry Erik, you're only half right. < G > I use custom dataenvironment classes all the time. However, I've never tried to add cursors at runtime via addobject. I define the DE class in code, for example:
>
Hi Bill-
I never said that you can't use your own class, only that if you want to add a dataenvironment to a container, that container has to be a form. Many frameworks use custim DE classes- this is a great way to do things- but the DE's are still being added to the forms- only at run time instead of design time.
Jeff- yes there is a new session class that shipped with SP3. This is not a containerclass however, and cannot hold cursor objects. It was primarily to make working with Multithreaded DLLs simpler- so you could have a single class without the overhead of a form class, that had it's own private datasession.
Erik Moore
Clientelligence