G
Guest
Hi,
I have placed the Sql Connection in the App.Config of the project. When I
am trying to read this value from the project it is giving the error "Object
Reference not set to an instance of Object". I am calling the function in
this project from a web project. Is it due to that? My App.Config file and
Code is as follows
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SqlConnectionString" value="TestValue" />
</appSettings>
</configuration>
Dim test as string =
System.Configuration.ConfigurationSettings.AppSettings("SqlConnectionString").ToString()
I am using this inside a private shared function.
Please let me know.
Thnx,
Sridhar.
I have placed the Sql Connection in the App.Config of the project. When I
am trying to read this value from the project it is giving the error "Object
Reference not set to an instance of Object". I am calling the function in
this project from a web project. Is it due to that? My App.Config file and
Code is as follows
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="SqlConnectionString" value="TestValue" />
</appSettings>
</configuration>
Dim test as string =
System.Configuration.ConfigurationSettings.AppSettings("SqlConnectionString").ToString()
I am using this inside a private shared function.
Please let me know.
Thnx,
Sridhar.