Posted on 2005-04-26
Last Modified: 2012-06-27
I am trying, and thought I had been successful at, providing to my user a list of available SQL servers to choose from.  The code below works fine on my machine but I have been unable to get it to execute anywhere else.

        Dim i As Integer
        Dim oNames As SQLDMO.NameList
        Dim oSQLApp As SQLDMO.Application

        'Retrieve the default User ID from the config file
        txtUserID.Text = AppConfig.Key("DefaultUser")

        oSQLApp = New SQLDMO.Application
        oNames = oSQLApp.ListAvailableSQLServers()
        For i = 1 To oNames.Count
            'Add to ComboBox

This works like a charm on my development machine but throws an error everywhere else including other development machine which is as far as i can tell identical.  The error it throws is "QueryInterface for interface SQLDMO.NameList failed".  The only suggestion I can find is that I need to install SP2 for SQL Server but I already have SP3.  I've insured that the .dll is in the app base directory.

I am offering 500 pts because this is really bugging me and I want to make sure it is good and thoroughly killed.
Question by:Brian Crowe
    LVL 96

    Accepted Solution

    I looks like you didn't install the SQLDMO client on the server:

    How to distribute and how to install SQL-DMO for SQL Server 2000:

    LVL 34

    Author Comment

    by:Brian Crowe
    My apologies...I hate to be one of those that leaves 'em hangin'

    I just forgot about the question being out there once your suggestions solved it.

    Thank you

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Introduction When many people think of the WebBrowser ( control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
    It’s quite interesting for me as I worked with Excel using for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now