>>>>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?
>>>>
>>>>Thanks,
>>>
>>>You would have to restore datasession and restore Grid.Recordsource and Column.Controlsources programmatically. It would be even better if you find a way when you do not need to switch datasessions.
>>
>>Yes that's what I do, But I touhgt there would be another way, I need to switch between datasessions, Thanks Edward.
>
>Ok, Pablo. If Mr. Petersen will jump into this thread, take it easy.
Well, I did, but I'm not nearly as much fun to argue with as John. I think firing up a session object subclass to do the work, so that the form's datasession gets left alone, might well be a solution. If JVP jumps in, I'd expect him to have a better solution than yours ("reset the datasession and re-set-up the grid" - the traditional approach) or mine ("do everything in a Session object and leave the damned datasession of the form alone!" - admittedly a SWAG). John might have a practical alternative to these.