S
Steve Enzer
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" ?>
<configuration>
<appSettings> <add key="ConnectionString" value="server=localhost;user
id=root;password=pw;database=aceinventory;pooling=false"/>
</appSettings>
</configuration>
The file is named ACE_Inventory.config 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:
sInventoryConnection =
System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
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" ?>
<configuration>
<appSettings> <add key="ConnectionString" value="server=localhost;user
id=root;password=pw;database=aceinventory;pooling=false"/>
</appSettings>
</configuration>
The file is named ACE_Inventory.config 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:
sInventoryConnection =
System.Configuration.ConfigurationSettings.AppSettings("ConnectionString")
Unfortunately, this does not read the config file.
I'd sure appreciate any advice.
Thanks, Steve Enzer