The Connection string is correct since I used it as a variable prior.
Error is "ConfigurationManager is not declared. it may be inaccessible due to its protection level."
here is how I'm trying to call it
here is my app.config file, which I'm not sure is correct.
DougP
Error is "ConfigurationManager is not declared. it may be inaccessible due to its protection level."
here is how I'm trying to call it
Code:
Imports System.Configuration
Dim ConnectionString As String = ConfigurationManager.ConnectionStrings("HistDataLocaldbConnectionString").ConnectionString
...
Code:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" />
</startup>
<connectionStrings>
<add name="HistDataLocaldbConnectionString"
providerName="System.Data.ProviderName"
connectionString="Server=MyServer\SQLExpress;Database=MyDb;Integrated Security=true;" />
</connectionStrings>
</configuration>
DougP