I need to use a configuration file to set the connection string for the ado
data connector in my project, but I'm having trouble reading the config
file.
My config file contains the following:
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings> <add key="Connection String" value="server=l ocalhost;user
id=root;passwor d=pw;database=a ceinventory;poo ling=false"/>
</appSettings>
</configuration>
The file is named ACE_Inventory.c onfig where ACE_Inventory is the name of
the project's exe file and is located in the project's bin folder.
I'm using the following line to read the file:
sInventoryConne ction =
System.Configur ation.Configura tionSettings.Ap pSettings("Conn ectionString")
Unfortunately, this does not read the config file.
I'd sure appreciate any advice.
Thanks, Steve Enzer
data connector in my project, but I'm having trouble reading the config
file.
My config file contains the following:
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<appSettings> <add key="Connection String" value="server=l ocalhost;user
id=root;passwor d=pw;database=a ceinventory;poo ling=false"/>
</appSettings>
</configuration>
The file is named ACE_Inventory.c onfig where ACE_Inventory is the name of
the project's exe file and is located in the project's bin folder.
I'm using the following line to read the file:
sInventoryConne ction =
System.Configur ation.Configura tionSettings.Ap pSettings("Conn ectionString")
Unfortunately, this does not read the config file.
I'd sure appreciate any advice.
Thanks, Steve Enzer
Comment