Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7912711
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T13:40:36+00:00 2026-06-03T13:40:36+00:00

I add Microsoft.Data.ConnectionUI.Dialog.dll and Microsoft.Data.ConnectionUI.dll dlls to my project, and use this code: Microsoft.Data.ConnectionUI.DataConnectionDialog

  • 0

enter image description here

I add Microsoft.Data.ConnectionUI.Dialog.dll and Microsoft.Data.ConnectionUI.dll dlls to my project, and use this code:

    Microsoft.Data.ConnectionUI.DataConnectionDialog dcd = new Microsoft.Data.ConnectionUI.DataConnectionDialog();

        Microsoft.Data.ConnectionUI.DataSource.AddStandardDataSources(dcd);

        if (Microsoft.Data.ConnectionUI.DataConnectionDialog.Show(dcd) == System.Windows.Forms.DialogResult.OK)
        {
            //
        }
        else
        {
            //
        }

When I use this in normal windows applications, everything seems to be ok (shows standard VS dataconnection dialog with Advanced button). When I use it in SETUP PROJECT, it shows only the advanced dialog AND the OK button is disabled. Users can test the connection but can not press OK button.

Does anyone know what why this is not working?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T13:40:37+00:00Added an answer on June 3, 2026 at 1:40 pm

    The buttons are enabled/disabled depending on the settings.

    In this article: http://erikej.blogspot.com.au/2010/04/using-adonet-data-connection-dialog-in.html the author “hardcodes” the datasource and this consequentially disables the “Change” button.

    When you set the DataSource name, the OK button should be enabled. I dug up the Data Connection Dialog Source Code code to show you:
    http://archive.msdn.microsoft.com/Connection/Release/ProjectReleases.aspx?ReleaseId=3863

    In the Micrsost.Data.ConnectionUI.Dialog project, open the DataConnectionDialog.cs class and you can see this is the event:

    private void ConfigureAcceptButton(object sender, EventArgs e)
    {
    try
    {
    acceptButton.Enabled = (ConnectionProperties != null) ? ConnectionProperties.IsComplete : false;
    }
    catch
    {
    acceptButton.Enabled = true;
    }
    }
    

    The above event is hooked up from the ConnectionProperties method and is invoked each time the PropertyChange event fires:

    properties.PropertyChanged += new EventHandler(ConfigureAcceptButton);
    

    To get the OK button enabled you will need to satisfy the ConnectionProperties.IsComplete condition.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to add my project under source control. I am using Microsoft
I want to use Microsoft Enterprise library Data Application Block for MS Access database
In Visual Studio 2010, attempting to use the Server Explorer to add a data
I am trying to add custom icons to a Shared Add-in for Microsoft Word.
Is there a way to create and install a Microsoft Office Add-in without packaging
Is there a way to add a deployment administrator to Microsoft CRM 4.0 using
I have a bound form in microsoft access that allows a user to add
I am trying to create an add-in by using the article below http://blogs.microsoft.co.il/blogs/shair/archive/2008/07/28/how-to-create-sql-server-management-studio-addin.aspx I
I'm using Microsoft.Win32.OpenFileDialog dlg in my WPF application. Is there any way to add
I am making a custom control I need to add some default keybindings, microsoft

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.