using System.Diagnostics;//在调用命名空间时调用。try
{
Process.Start("odbccp32.cpl");
}
catch(Win32Exception win32ex)
{
MessageBox.Show("出错原因:"+win32ex.Message,"出错",MessageBoxButtons.OK,MessageBoxIcon.Error);
}

解决方案 »

  1.   

    liduke:
    你的只是启动程序,有什么用啊
      

  2.   

    添加引用 COM -> ODBC Driver & Data Source Name functions
    ODBCTool.DsnClass xx = new ODBCTool.DsnClass();
    string DSNName = "test";
    string driver ="SQL Server";
                              string server = "XXXX"
                                string db = "northwind"
    bool b = true;
    xx.CreateDSN(ref DSNName,ref driver,...);
      

  3.   

    Com : ODBC Driver & Data Source Name functions
    为什么我的电脑中的Com组件中没有啊