0

Hello I'm am beginning with visual studio and C#

I saw a very nice thread here: Display a ConnectionString dialog

Sadly the Link for the sample code is dead

Either way I need to use the object : DataConnectionDialog

this object is in the Windows.VisualStudio.Data namespace. Where can I Include that it's not there in the add reference window. Where can I download that.

I am using VS community 2013

user3704628
  • 143
  • 1
  • 12

1 Answers1

0

You can add reference to Microsoft.Data.ConnectionUI.Dialog.dll which can be found under C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Microsoft.Data.ConnectionUI.Dialog.dll

Microsoft.Data.ConnectionUI.DataConnectionDialog dlg = new Microsoft.Data.ConnectionUI.DataConnectionDialog();
        Microsoft.Data.ConnectionUI.DataSource.AddStandardDataSources(dlg);          
        if (Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(dlg) == DialogResult.OK)
        {

        }
Ginish
  • 191
  • 1
  • 4
  • I doubt that file is redistributable. – leppie Mar 11 '15 at 11:04
  • 1
    alternatively you can download using Nuget Package Manager; just search for Microsoft Data Connection Dialog. or you can go to https://www.nuget.org/packages/DataConnectionDialog/1.2.0 you can also check license here. – Ginish Mar 11 '15 at 11:29