Problems with ListAvailableSQLServers (SQLDMO)

  • Thread starter Thread starter Craig G
  • Start date Start date
C

Craig G

i have the following code in a form load event, that (should) simply
populate a combobox with the names of all SQL servers on the network

Dim x As Long
Dim sqlNameList As SQLDMO.NameList

'Filling Servers Name

sqlNameList = sqlApp.ListAvailableSQLServers

For x = 1 To sqlNameList.Count

cbo_Server.Items.Add(UCase(sqlNameList.Item(x)))

Next


Me.Show()



but it falls over on the ListAvailableServers, with the following error

"QueryInterface for interface SQLDMO.NameList failed."



im pretty new to this .net (vb6 previously) so i dont know what is wrong

any idea's??

Cheers,
Craig
 
Gambit001 said:
"QueryInterface for interface SQLDMO.NameList failed."

If you're running SQL2000, make sure SP2 is installed. This was a known
bug fixed in SP2.
 
Back
Top