SQL Server Connection String Utility

Posted on 2007-10-08
Last Modified: 2013-12-17
Need help to create a utility program that can simplify the configuration of the connection string for a client workstation to connect to a named instance of an SQL Server.  This utility must provide an extremely basic interface so as to be intuitive to even the most illiterate computer user - there would be a drop-down box listing all servers on the network.  Once the user selects the server with the "MYAPP" instance, the utility would read the selected data and add it to the app.config setting.  The DB password will be hard-coded into the app.  Need help with the design and coding of this tool.  Not sure how to "look" for available servers.
Question by:dev775
    LVL 29

    Accepted Solution

    SQLDMO.Application app = new SQLDMO.ApplicationClass();
                      SQLDMO.NameList nameList = app.ListAvailableSQLServers();
                      for (int i=0; i<nameList.Count; i++)
                            string srvName = nameList.Item(i + 1);
    LVL 29

    Expert Comment

    by:Gautham Janardhan
    add refernce -> Com - > SQL DMO Object
    LVL 29

    Expert Comment

    by:Gautham Janardhan
    Microsoft SQLDMO Object Library

    Author Comment

    Ok, thanks.  I will give this a try.  May need a little more help after getting into it.

    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.

    Join & Write a Comment

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
    Via a live example, show how to setup several different housekeeping processes for a SQL Server.

    732 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

    26 Experts available now in Live!

    Get 1:1 Help Now