Null Reference Exception on Connection Open

344
0
03-10-2021 12:53 PM
rajujee
New Contributor II

Hi,

 

I am working on ArcObjects using Visual Studio 2015.  I am connecting 'sql server' connection and getting System.NullREferenceExpceiotn occureed in MyToolbox.dll. I am using ArcMap 10.6.1.

 

Here are steps

1. Added App.config 

<add name="SQLserver" connectionString="server=xxx;database=xxx;User Id=xxx;Password=xxx"/>

2.  Button.vb file


Dim SqlDB As Object = ConfigurationManager.ConnectionStrings("SQLserver").ConnectionString

 

0 Kudos
0 Replies