Page 1 of 1

Removing a single database

Posted: Wed Oct 15, 2008 9:38 am
by ColinM
Hi,

Is it possible to remove a single connection from Me.Dictionary.Databases? I don't want to call Me.Dictionary.Databases.Clear() as this removes my second connection (which is being re-set externally, so I can't re-add it within the mrt). Is there any way to call something like Me.Dictionary.Databases.Remove for a particular connection?

Thanks,
Colin

Removing a single database

Posted: Wed Oct 15, 2008 11:29 am
by Vital
Hello Colin,
Is it possible to remove a single connection from Me.Dictionary.Databases? I don't want to call Me.Dictionary.Databases.Clear() as this removes my second connection (which is being re-set externally, so I can't re-add it within the mrt). Is there any way to call something like Me.Dictionary.Databases.Remove for a particular connection?
You can use following code:

Code: Select all

report.Dictionary.Databases.RemoveAt(0);
Thank you.

Removing a single database

Posted: Thu Oct 16, 2008 8:36 am
by ColinM
This seems to corrupt the second connection. My client application is now passing the connection string in as a variable, and I am calling Databases.Clear and re-adding both connections, so problem solved (by an alternate approach).

Thanks,
Colin