How to open ODBC Administrator from C#

Posted on 2012-08-16
Last Modified: 2012-08-17
I am programming a C# application where someone can use a DSN on the computer to connect to a database.  I have the ability to find all system and user-based DSNs, and allow the user to select an existing DSN, and move forward from problems.

My issue is Setup of a new odbc connection.  How do I open the control panel's ODBC Administrator to create a new one using the wizard?

I'd like to assign a button to it.

Question by:Evan Cutler
    LVL 12

    Accepted Solution


    If you would like to launch "ODBC Data Source Administrator", try the following code:
    System.Diagnostics.Process.Start(Environment.GetEnvironmentVariable("SystemRoot") + @"\system32\odbcad32.exe");

    Open in new window

    If you want to add DSN entry using C#, refer:
    LVL 35

    Expert Comment

    LVL 9

    Author Closing Comment

    by:Evan Cutler
    That did it.
    Thanks Much :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
    I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
    Video by: Steve
    Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    10 Experts available now in Live!

    Get 1:1 Help Now