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.
LVL 34
Brian CroweDatabase AdministratorAsked:
Who is Participating?
Bob LearnedConnect With a Mentor Commented:
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:

Brian CroweDatabase AdministratorAuthor Commented:
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
All Courses

From novice to tech pro — start learning today.