I am using VB.NET 2003.
I found the following sample code here in an article:
Dim oSQLServerDMOApp As New SQLDMO.Application
Dim i As Integer
Dim namX As SQLDMO.NameList
namX = oSQLServerDMOApp.ListAvailableSQLServers
For i = 1 To namX.Count
cbSQLServer.Items.Add(namX.Item(i))
Next
When I try to use it, I get the runtime error:
QueryInterface for interface SQLDMO.NameList failed.
I cannot find this error documented anywhere. Can anyone help?