清风的blog 优然探索

调用微软的数据库连接对话框

using Microsoft.Data.ConnectionUI;

 

        private void button1_Click(object sender, EventArgs e)
        {
            DataConnectionDialog dlg = new DataConnectionDialog();
            dlg.DataSources.Add(DataSource.SqlDataSource);
            dlg.SelectedDataProvider = DataProvider.SqlDataProvider;
            DataConnectionDialog.Show(dlg, this);

        }

2011年1月11日 | 发布:admin | 分类:学习收藏 | 评论:0

发表留言: