How create data sources programmatically?

Help
Gubbstygg
2005-06-09
2013-04-24
  • Gubbstygg
    Gubbstygg
    2005-06-09

    I would like to create data sources programmatically so I don't have to install the Mpm Administrator at every site. Could I get som examples on how to do this?

    /Andreas

     
    • Bengt Gunne
      Bengt Gunne
      2005-06-10

      You do something like this:

      //
      //  Create a data source descriptor for plugin Mimer
      //
      MpmDataSourceDescriptor dataSourceDescriptor = new MpmDataSourceDescriptor("DataSourceName", connectionString, "Mimer", new string[] { "ParameterMarkers"});
      dataSourceDescriptor.DbmsTypeName = "Mimer SQL ";
      //
      //  Save the data source
      //
      MpmInfo.SaveConfigInfo(dataSourceDescriptor, false);

      Regards
      Bengt

       
    • Gubbstygg
      Gubbstygg
      2005-06-10

      I'll try that, thanks!