>Hi,
>
>I have a form with no private datasession, with a grid from a cursor whem I change by code the datasession to n, I loose the grid recordsource and column controlsource???
>
>How to prevent this?
You're stuck as long as you remain in the context of the form - if anything causes a refresh to occur, the cursor (in the default datasession) is not accessible if you're in other than the default datasession - a form must operate in the context of a single session.
If you have to leave the form up and active, you migth try creating something based on a session object subclass - set up the session object with a private datasession, and do whatever is needed in methods of the session - that way the form retains its default datasession.