Removing a single database

Stimulsoft Reports.NET discussion
Post Reply
ColinM
Posts: 12
Joined: Wed Oct 01, 2008 9:28 am

Removing a single database

Post 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
Vital
Posts: 1278
Joined: Fri Jun 09, 2006 4:04 am

Removing a single database

Post 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.
ColinM
Posts: 12
Joined: Wed Oct 01, 2008 9:28 am

Removing a single database

Post 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
Post Reply