I am trying to create a .config file for a windows
test application.

I am using

System.Configuration namespace
trying to access northwind and pubs

I am trying to access them by this line of code

strConnection = ConfigurationSettings.AppSettings["northwind"]
how do I name the .config file so it will associate itself with my app

assembly.exe.config
app.config
app.exe.config
<app>.exe.config
<app>.config

here is the xml from my config file

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appsettings>
  <add key="northwind"
  value="server=(local);user
id=test;password=test;database=northwind" />
  <add key="pubs"
  value="server=(local);user
id=test;password=test;database=pubs" />
 </appsettings>
</configuration>

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to