Hi, I have a windows forms c#.net app and I want to get the connection string from my app.config file which is shown below: how do I achieve this Thanx in advance Robert <configuration> <configSections> </configSections> <connectionStrings> <add name="DataAccess.Properties.Settings.MARSConnectionString" connectionString="Data Source=LON-OXBRD01;Initial Catalog=MARS;Integrated Security=True" providerName="System.Data.SqlClient" /> </connectionStrings> </configuration>
"Robert Smith" schrieb: > Hi, I have a windows forms c#.net app and I want to get the connection > string > from my app.config file which is shown below: > > <configuration> > <configSections> > </configSections> > <connectionStrings> > <add name="DataAccess.Properties.Settings.MARSConnectionString" > connectionString="Data Source=LON-OXBRD01;Initial > Catalog=MARS;Integrated Security=True" > providerName="System.Data.SqlClient" /> > </connectionStrings> > </configuration> 'Properties.Settings.Default.MARSConnectionString'. -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://dotnet.mvps.org/dotnet/faqs/>