getting error code while connecting to sql server

I am getting an error

A first chance exception of type 'System.NullReferenceException' occurred in WindowsFormsApplication2.exe

Additional information: Object reference not set to an instance of an object.

If there is a handler for this exception, the program may be safely continued.]

during connecting to sql server 2012 from my visual studio for c#. when debugged pointing the error is at :

connectionString = System.Configuration.ConfigurationManager.ConnectionStrings["MyConnection"].ConnectionString;
链接地址: http://www.djcxy.com/p/27980.html

上一篇: “使用新关键字创建对象”实例错误

下一篇: 连接到sql server时获取错误代码