Page 1 of 1
How to disable specific DataAdapter and Database in the Designer
Posted: Wed Jan 03, 2007 7:36 am
by Markus Weiß
How can i can i disable some of the DataAdapters an Database in the designer dictionary. For example i want to disable the StiEnumerableAdapterService and the StiXmlDatabase Service using code.
Thanks for your help
How to disable specific DataAdapter and Database in the Designer
Posted: Wed Jan 03, 2007 10:53 pm
by Vital
Please use following code:
Code: Select all
StiServiceContainer services = StiConfig.Services.GetServices(typeof(StiDataAdapterService));
foreach (StiService service in services)
{
if (service is StiEnumerableAdapterService)service.ServiceEnabled = false;
}
services = StiConfig.Services.GetServices(typeof(StiDatabase));
foreach (StiService service in services)
{
if (service is StiXmlDatabase)service.ServiceEnabled = false;
}
Thank you.
How to disable specific DataAdapter and Database in the Designer
Posted: Thu Jan 04, 2007 3:15 am
by Markus Weiß
Thanks for your quick and professional help.