Using sqldmo.dll in .Net Windows application

  • Thread starter Thread starter Kirti
  • Start date Start date
K

Kirti

I have created Windows application in .Net.
Here I want to display all SQL Server names.
For this I am using sqldmo.dll.I have added this dll into
references but it gives exception "QueryInterface failed".

I have this in VB.It's working fine there.

Can anybody help me in solving this problem?

Below I am giving the code for

Dim obj As New SQLDMO.Application()
Dim obj As New SQLDMO.Application()
obj.ListAvailableSQLServers.Count
obj.ListAvailableSQLServers.Item(1)
End sub
 
* "Kirti said:
I have created Windows application in .Net.
Here I want to display all SQL Server names.
For this I am using sqldmo.dll.I have added this dll into
references but it gives exception "QueryInterface failed".

I have this in VB.It's working fine there.

Can anybody help me in solving this problem?

Below I am giving the code for

Dim obj As New SQLDMO.Application()
Dim obj As New SQLDMO.Application()
obj.ListAvailableSQLServers.Count
obj.ListAvailableSQLServers.Item(1)
End sub

What's the relation to Windows Forms programming in this question?
 
Back
Top