January 31, 2007 at 8:57 pm
I'm using the following code to show all SQL servers:
oSQLApp =
New SQLDMO.ApplicationoNames = oSQLApp.ListAvailableSQLServers()
For i = 1 To oNames.CountMe.cmbSQLServer.Items.Add(oNames.Item(i))Next i
February 5, 2007 at 8:00 am
This was removed by the editor as SPAM
October 5, 2007 at 11:50 am
I had the same problem I also was using DMO.
I decided to work with SMO and it worked.
The following is the code I used instead.
Imports Microsoft.SqlServer.Management.Smo
Imports Microsoft.SqlServer.Management.Common
Dim dts As DataTable = SmoApplication.EnumAvailableSqlServers(False)
cmbSServers.DataSource = dts
cmbSServers.ValueMember = "Name"
SMO is the WAY TO GO !!!!
March 3, 2008 at 12:41 pm
Hey -
I have now seen this solution in two forums - and when I try and run this (mind you, I am very new to this), it looks like it cannot find any entry for "Imports Microsoft.SqlServer.Management.Common"...Am I missing something? is there something not installed correctly?
TIA
-- Cory
March 3, 2008 at 12:53 pm
Okay - I found the answer to my question (Microsoft.SqlServer.ConnectionInfo)...
now I get Name 'cmbSServers' is not declared, which is true, it is not...but...???
I will need to sit down with some books and read up on this...I dont even know what to ask.
-- Cory
March 3, 2008 at 12:54 pm
I am an idiot. I figured it out.
-- Cory
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply