Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 12 of 12 total
Thread Switching Session in a program
Fri, Oct 23 2020 1:28 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Raul

>> <<It's pretty simple to write something for example that closes it all
>> from "bottom up".>>
>>
>>
>> Yes, but why bother - just closing the engine should close everything else.
>>
>
>If all you want to do is close then possibly yes but closing engine is
>bit of a sledgehammer approach.

I'd view either as appropriate if you need to close everything

>I have found that managing your sessions/db/datasets long term is lot
>more maintenable - especially if you want to close and then open or
>maybe have different sessions mixed etc

Fully agree with this

Roy
Wed, Oct 28 2020 9:38 AMPermanent Link

Adam Brett

Orixa Systems

Roy  & Raul

You are both right, and I have added a bit of code to iterate DB.Datasets[i] ... which is great.

DB.Close does close all the datasets, so DB.Datasets[i].Close isn't necessary, but as the EDBDataset includes a SessionName property, if you connect to a new session any "dangling" dataset with the wrong SessionName will cause an error when it reopens, so DB.Datasets[i].SessionName is really useful to iterate and change (if this is the behaviour you need!).
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image