private void buttonMakeString_Click(object sender, EventArgs e) { var d = new DataConnectionDialog(); DataSource.AddStandardDataSources(d); var result = DataConnectionDialog.Show(d); if (result == System.Windows.Forms.DialogResult.OK) { textBoxConnection.Text = d.ConnectionString; var provider = d.GetSelectedDataProvider(d.SelectedDataSource); textBoxProvider.Text = provider.Name; } }